We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example:
// lib.rs pub mod a; // a.rs macro_rules! b ( () => {} );
Running cargo expand whatever will dump the whole expanded crate.
cargo expand whatever
If we change the macro to
macro_rules! b { () => {} }
It will fail correctly with WARNING: no such item: asdasda
WARNING: no such item: asdasda
Having a macro like this anywhere in the crate will break the path resolution mechanism, for some reason, causing the path to be ignored all the time.
I'm not sure if macro_rules with parens has any rightful place to exist, but I just spent about half an hour trying to figure this one out ;-;
The text was updated successfully, but these errors were encountered:
This appears to be a bug in rustc's expander. It emits the following:
#![feature(prelude_import)] #[prelude_import] use std::prelude::v1::*; #[macro_use] extern crate std; pub mod a { macro_rules! b(() => { }) }
Notice that it strips the semicolon.
Sorry, something went wrong.
Posted rust-lang/rust#81888 with a fix.
Confirmed fixed as of nightly-2021-02-10 by rust-lang/rust#81888.
No branches or pull requests
Example:
Running
cargo expand whatever
will dump the whole expanded crate.If we change the macro to
It will fail correctly with
WARNING: no such item: asdasda
Having a macro like this anywhere in the crate will break the path resolution mechanism, for some reason, causing the path to be ignored all the time.
I'm not sure if macro_rules with parens has any rightful place to exist, but I just spent about half an hour trying to figure this one out ;-;
The text was updated successfully, but these errors were encountered: