]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/lexical.rs
Merge commit '0eff589afc83e21a03a168497bbab6b4dfbb4ef6' into clippyup
[rust.git] / src / test / ui / hygiene / lexical.rs
1 // check-pass
2 // ignore-pretty pretty-printing is unhygienic
3
4 #![feature(decl_macro)]
5
6 mod bar {
7     mod baz {
8         pub fn f() {}
9     }
10
11     pub macro m($f:ident) {
12         baz::f();
13         let _: i32 = $f();
14         {
15             fn $f() -> u32 { 0 }
16             let _: u32 = $f();
17         }
18     }
19 }
20
21 fn main() {
22     fn f() -> i32 { 0 }
23     bar::m!(f);
24 }