2019-07-14 11:34:13 +01:00
|
|
|
//@ check-pass
|
2018-02-08 16:26:33 -08:00
|
|
|
|
2018-04-27 21:32:00 -07:00
|
|
|
#![feature(decl_macro)]
|
2018-02-08 16:26:33 -08:00
|
|
|
#![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() {}
|