mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
19 lines
351 B
Rust
19 lines
351 B
Rust
// 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() {}
|