2025-07-18 22:06:07 +05:00
|
|
|
//! Regression test for https://github.com/rust-lang/rust/issues/10465
|
|
|
|
|
|
2014-01-06 16:47:00 -08:00
|
|
|
pub mod a {
|
|
|
|
|
pub trait A {
|
|
|
|
|
fn foo(&self);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
pub mod b {
|
|
|
|
|
use a::A;
|
|
|
|
|
|
|
|
|
|
pub struct B;
|
|
|
|
|
impl A for B { fn foo(&self) {} }
|
|
|
|
|
|
|
|
|
|
pub mod c {
|
|
|
|
|
use b::B;
|
|
|
|
|
|
|
|
|
|
fn foo(b: &B) {
|
2015-05-02 23:30:59 -06:00
|
|
|
b.foo(); //~ ERROR: no method named `foo` found
|
2014-01-06 16:47:00 -08:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {}
|