rust/tests/ui/proc-macro/generate-dollar-ident.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
349 B
Rust
Raw Normal View History

// Proc macros can generate token sequence `$ IDENT`
// without it being recognized as an unknown macro variable.
// check-pass
// aux-build:generate-dollar-ident.rs
extern crate generate_dollar_ident;
use generate_dollar_ident::*;
macro_rules! black_hole {
($($tt:tt)*) => {};
}
black_hole!($var);
dollar_ident!(black_hole);
fn main() {}