]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/lexical.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[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 }