mirror of
https://github.com/rust-lang/rust.git
synced 2024-10-31 22:41:50 +00:00
22 lines
281 B
Rust
22 lines
281 B
Rust
// check-pass
|
|
// ignore-pretty pretty-printing is unhygienic
|
|
|
|
#![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() {}
|