mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +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
|
|
}
|