mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
20 lines
234 B
Rust
20 lines
234 B
Rust
// check-pass
|
|
|
|
#![feature(decl_macro)]
|
|
#![allow(unused)]
|
|
|
|
mod foo {
|
|
pub macro m($s:tt, $i:tt) {
|
|
$s.$i
|
|
}
|
|
}
|
|
|
|
mod bar {
|
|
struct S(i32);
|
|
fn f() {
|
|
let s = S(0);
|
|
::foo::m!(s, 0);
|
|
}
|
|
}
|
|
|
|
fn main() {}
|