2016-08-19 17:52:26 -05:00
|
|
|
mod a {
|
|
|
|
fn foo() {}
|
|
|
|
mod foo {}
|
|
|
|
|
|
|
|
mod a {
|
2018-01-12 15:41:45 -06:00
|
|
|
pub use super::foo; //~ ERROR cannot be re-exported
|
2016-08-19 19:33:06 -05:00
|
|
|
pub use super::*; //~ ERROR must import something with the glob's visibility
|
2016-08-19 17:52:26 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod b {
|
|
|
|
pub fn foo() {}
|
|
|
|
mod foo { pub struct S; }
|
|
|
|
|
|
|
|
pub mod a {
|
|
|
|
pub use super::foo; // This is OK since the value `foo` is visible enough.
|
2018-01-12 15:41:45 -06:00
|
|
|
fn f(_: foo::S) {} // `foo` is imported in the type namespace (but not `pub` re-exported).
|
2016-08-19 17:52:26 -05:00
|
|
|
}
|
2016-08-19 19:33:06 -05:00
|
|
|
|
|
|
|
pub mod b {
|
|
|
|
pub use super::*; // This is also OK since the value `foo` is visible enough.
|
2018-01-12 15:41:45 -06:00
|
|
|
fn f(_: foo::S) {} // Again, the module `foo` is imported (but not `pub` re-exported).
|
2016-08-19 19:33:06 -05:00
|
|
|
}
|
2016-08-19 17:52:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
mod c {
|
2018-01-12 15:41:45 -06:00
|
|
|
// Test that `foo` is not re-exported.
|
2016-08-19 17:52:26 -05:00
|
|
|
use b::a::foo::S; //~ ERROR `foo`
|
2016-08-19 19:33:06 -05:00
|
|
|
use b::b::foo::S as T; //~ ERROR `foo`
|
2016-08-19 17:52:26 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {}
|