]> git.lizzy.rs Git - rust.git/blob - src/test/ui/shadowed/shadowed-trait-methods.rs
Merge commit 'c4416f20dcaec5d93077f72470e83e150fb923b1' into sync-rustfmt
[rust.git] / src / test / ui / shadowed / shadowed-trait-methods.rs
1 // Test that methods from shadowed traits cannot be used
2
3 mod foo {
4     pub trait T { fn f(&self) {} }
5     impl T for () {}
6 }
7
8 mod bar { pub use foo::T; }
9
10 fn main() {
11     pub use bar::*;
12     struct T;
13     ().f() //~ ERROR no method
14 }