rust/tests/ui/hygiene/issue-47311.rs
2023-01-11 09:32:08 +00:00

18 lines
233 B
Rust

// check-pass
// ignore-pretty pretty-printing is unhygienic
#![feature(decl_macro)]
#![allow(unused)]
macro m($S:ident, $x:ident) {
$S { $x: 0 }
}
mod foo {
struct S { x: i32 }
fn f() { ::m!(S, x); }
}
fn main() {}