2019-07-14 11:34:13 +01:00
|
|
|
// check-pass
|
2017-05-25 02:04:03 +00:00
|
|
|
// ignore-pretty pretty-printing is unhygienic
|
|
|
|
|
|
2018-04-27 21:32:00 -07:00
|
|
|
#![feature(decl_macro)]
|
2017-03-25 02:37:55 +00:00
|
|
|
|
|
|
|
|
mod bar {
|
|
|
|
|
mod baz {
|
|
|
|
|
pub fn f() {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
pub macro m($f:ident) {
|
|
|
|
|
baz::f();
|
|
|
|
|
let _: i32 = $f();
|
|
|
|
|
{
|
|
|
|
|
fn $f() -> u32 { 0 }
|
|
|
|
|
let _: u32 = $f();
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
fn f() -> i32 { 0 }
|
|
|
|
|
bar::m!(f);
|
|
|
|
|
}
|