]> git.lizzy.rs Git - rust.git/blob - src/test/ui/shadowed/shadowed-trait-methods.rs
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[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 }