]> git.lizzy.rs Git - rust.git/blob - src/test/ui/hygiene/trait_items.rs
Rollup merge of #90202 - matthewjasper:xcrate-hygiene, r=petrochenkov
[rust.git] / src / test / ui / hygiene / trait_items.rs
1 #![feature(decl_macro)]
2
3 mod foo {
4     pub trait T {
5         fn f(&self) {}
6     }
7     impl T for () {}
8 }
9
10 mod bar {
11     use foo::*;
12     pub macro m() { ().f() }
13     fn f() { ::baz::m!(); }
14 }
15
16 mod baz {
17     pub macro m() { ().f() } //~ ERROR no method named `f` found
18     fn f() { ::bar::m!(); }
19 }
20
21 fn main() {}