mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 02:33:55 +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
|
|
}
|