Closed
Description
Consider the following:
mod a {
pub struct Foo;
impl Foo { pub fn bar() {} }
}
fn main() {
use std::io::File::open;
use a::Foo::bar;
}
Only the import from non-std module is reported as "error: Cannot import from a trait or type implementation". It is inconsistent and both should be recognized as error.
Some of the rustc internal code actually presume that is the case. Failing to do that leads to bug such as #15528.
Metadata
Metadata
Assignees
Labels
No labels