mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +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
|
|
}
|