rust/tests/ui/macros/macro-metavar-expr-concat/hygiene.rs

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

14 lines
264 B
Rust
Raw Normal View History

2024-06-14 01:12:26 +00:00
#![feature(macro_metavar_expr_concat)]
macro_rules! join {
($lhs:ident, $rhs:ident) => {
${concat($lhs, $rhs)}
//~^ ERROR cannot find value `abcdef` in this scope
};
}
fn main() {
let abcdef = 1;
let _another = join!(abc, def);
}