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.
In #6443 @cmr made rustc for the following code
explain
error: unresolved import: found "Foo" in "foo" but it is private.When the module members however are imported using
*this way: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.