rust/tests/ui/hygiene/lexical.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

24 lines
313 B
Rust
Raw Normal View History

// check-pass
2017-05-24 21:04:03 -05:00
#![feature(decl_macro)]
2017-03-24 21:37:55 -05: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);
}