-
-
Notifications
You must be signed in to change notification settings - Fork 14.3k
Closed
Milestone
Description
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) {
b.foo(); // trait A is not in scope at this location
}
}
}
fn main() {}That code compiles successfully, but I don't believe that it should. A the commented line, the trait A is not in scope for the module c, so I should get an error that b doesn't have any method named foo in scope.
Nominating, this is a backwards-compatibility issue.
Metadata
Metadata
Assignees
Labels
No labels