2013-02-25 19:10:42 +00:00
|
|
|
// regression test for issue 4366
|
|
|
|
|
|
|
|
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
|
|
|
|
// module 'foo'
|
|
|
|
|
2013-03-27 04:17:29 +00:00
|
|
|
use m1::*;
|
|
|
|
|
2013-02-25 19:10:42 +00:00
|
|
|
mod foo {
|
|
|
|
pub fn foo() {}
|
|
|
|
}
|
|
|
|
mod a {
|
|
|
|
pub mod b {
|
|
|
|
use foo::foo;
|
2018-12-17 03:21:47 +00:00
|
|
|
type Bar = isize;
|
2013-02-25 19:10:42 +00:00
|
|
|
}
|
|
|
|
pub mod sub {
|
|
|
|
use a::b::*;
|
2017-01-11 22:18:08 +00:00
|
|
|
fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
|
2013-02-25 19:10:42 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
mod m1 {
|
|
|
|
fn foo() {}
|
|
|
|
}
|
|
|
|
|
2013-10-05 21:44:37 +00:00
|
|
|
fn main() {}
|