You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
error[E0424]: expected value, found module `self`
--> src/main.rs:10:9
|
1 | / use async_trait::async_trait;
2 | |
3 | | #[async_trait]
4 | | trait T1 {
... |
9 | | ($ty: ty, $id: expr) => {
10 | | #[async_trait]
| | ^^^^^^^^^^^^^-
| |_________|____________|
| | this function doesn't have a `self` parameter
| `self` value is a keyword only available in methods with a `self` parameter
...
21 | impl_t1!(Foo, 1);
| ----------------- in this macro invocation
|
= note: this error originates in an attribute macro (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0424`.
error: could not compile `playground`.
To learn more, run the command again with --verbose.
The text was updated successfully, but these errors were encountered:
Hello there. I have problem with declarative macros. The code is simplified as below:
rust compiler generates an error:
The text was updated successfully, but these errors were encountered: