-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.
Description
In #6443 @cmr made rustc for the following code
mod foo {
struct Foo;
}
mod bar {
use foo::Foo;
struct Bar {
x : Foo
}
}
explain error: unresolved import: found "Foo" in "foo" but it is private
.
When the module members however are imported using *
this way:
mod foo {
struct Foo;
}
mod bar {
use foo::*;
struct Bar {
x : Foo
}
}
rustc only says error: use of undeclared type name "Foo"
.
I think the most prominent use case could be use super::*
in unit-test modules.
Metadata
Metadata
Assignees
Labels
A-diagnosticsArea: Messages for errors, warnings, and lintsArea: Messages for errors, warnings, and lintsA-resolveArea: Name/path resolution done by `rustc_resolve` specificallyArea: Name/path resolution done by `rustc_resolve` specificallyC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.