2013-10-05 14:44:37 -07:00
|
|
|
// ensures that 'use foo:*' doesn't import non-public item
|
|
|
|
|
|
|
|
|
|
use m1::*;
|
|
|
|
|
|
|
|
|
|
mod foo {
|
|
|
|
|
pub fn foo() {}
|
|
|
|
|
}
|
|
|
|
|
mod a {
|
|
|
|
|
pub mod b {
|
|
|
|
|
use foo::foo;
|
2018-12-16 22:21:47 -05:00
|
|
|
type Bar = isize;
|
2013-10-05 14:44:37 -07:00
|
|
|
}
|
|
|
|
|
pub mod sub {
|
|
|
|
|
use a::b::*;
|
2018-12-16 22:21:47 -05:00
|
|
|
fn sub() -> Bar { 1 }
|
|
|
|
|
//~^ ERROR cannot find type `Bar` in this scope
|
2013-10-05 14:44:37 -07:00
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
mod m1 {
|
|
|
|
|
fn foo() {}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
fn main() {
|
2016-12-01 01:35:25 +03:00
|
|
|
foo(); //~ ERROR expected function, found module `foo`
|
2013-10-05 14:44:37 -07:00
|
|
|
}
|