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
314 B
Rust
Raw Normal View History

//@ check-pass
2017-05-25 02:04:03 +00: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);
}