We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
macro_rules! static_methods { { $($t:ty :: $id:ident () -> $ret:expr);+ } => { $(static fn $id () -> $t { $ret })+ } } type MyInt = int; impl MyInt { static_methods! { MyInt::zero() -> 0; MyInt::one() -> 1; MyInt::life() -> 42; } } fn main() {}
macro-in-impl.rs:10:4: 10:18 error: unexpected token: `static_methods` macro-in-impl.rs:10 static_methods! {
The text was updated successfully, but these errors were encountered:
Yeah, this isn't supported right now, but #4621 requests it.
Sorry, something went wrong.
Closing as a dup. But this is one more vote for #4621 :-)
No branches or pull requests
The text was updated successfully, but these errors were encountered: