Closed
Description
For this code:
mod foo {
pub struct B(());
}
mod bar {
use foo::B;
fn foo() {
B(());
}
}
You get the following error message:
error[E0423]: expected function, found struct `B`
--> <anon>:7:9
|
7 | B(());
| ^
| |
| did you mean `B { /* fields */ }`?
| constructor is not visible here due to private fields
|
help: possible better candidate is found in another module, you can import it into scope
| use foo::B;
The suggestion may be excused to be not 100% perfect, but here it suggests to add an use statement despite that same item being imported already. What I want is this exactly: that it removes stuff from the suggestion list that is already being imported.
Note that changing the glob import to a non glob one doesn't change anything.