]> git.proxmox.com Git - rustc.git/blob - src/test/ui/hygiene/trait_items.rs
New upstream version 1.66.0+dfsg1
[rustc.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() {}