Open osa1 opened 3 years ago
Interestingly
cargo expand
prints the same error ("an inner attribute is not permitted in this context") but it's still able to expand the code, and expanded code works.
I'm guessing it's just running rustc, and the error occurs after macro expansion (though I may be totally wrong).
Cargo.toml:
The 'tracing' package is https://github.com/tokio-rs/tracing master branch (fe570af).
main.rs:
If I build this with current rustc master (4ba1aaf35f1):
However if I expand the macro/attribute using the same rustc using
cargo-expand
and replace main.rs with the expanded code, it builds fine. Expanded code:Interestingly
cargo expand
prints the same error ("an inner attribute is not permitted in this context") but it's still able to expand the code, and expanded code works.