Files
rust/tests/ui/shadowed/shadowed-trait-methods.rs
T
Christian Poveda b2ab7cf980 Gate 2015 UI tests
2025-11-27 11:19:00 -05:00

16 lines
259 B
Rust

//@ edition:2015
// Test that methods from shadowed traits cannot be used
mod foo {
pub trait T { fn f(&self) {} }
impl T for () {}
}
mod bar { pub use crate::foo::T; }
fn main() {
pub use bar::*;
struct T;
().f() //~ ERROR no method
}