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