mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
15 lines
235 B
Rust
15 lines
235 B
Rust
// Test that methods from shadowed traits cannot be used
|
|
|
|
mod foo {
|
|
pub trait T { fn f(&self) {} }
|
|
impl T for () {}
|
|
}
|
|
|
|
mod bar { pub use foo::T; }
|
|
|
|
fn main() {
|
|
pub use bar::*;
|
|
struct T;
|
|
().f() //~ ERROR no method
|
|
}
|