2016-03-07 23:11:46 +00:00
|
|
|
// Test that methods from shadowed traits cannot be used
|
|
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
|
pub trait T { fn f(&self) {} }
|
|
|
|
|
impl T for () {}
|
|
|
|
|
}
|
|
|
|
|
|
2025-06-05 08:41:49 +02:00
|
|
|
mod bar { pub use crate::foo::T; }
|
2016-03-07 23:11:46 +00:00
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
|
pub use bar::*;
|
|
|
|
|
struct T;
|
|
|
|
|
().f() //~ ERROR no method
|
|
|
|
|
}
|