mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
17 lines
186 B
Rust
17 lines
186 B
Rust
// check-pass
|
|
|
|
#![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() {}
|