mirror of
https://github.com/rust-lang/rust
synced 2024-11-05 20:45:15 +00:00
26 lines
431 B
Rust
26 lines
431 B
Rust
// regression test for issue 4366
|
|
|
|
// ensures that 'use foo:*' doesn't import non-public 'use' statements in the
|
|
// module 'foo'
|
|
|
|
use m1::*;
|
|
|
|
mod foo {
|
|
pub fn foo() {}
|
|
}
|
|
mod a {
|
|
pub mod b {
|
|
use foo::foo;
|
|
type Bar = isize;
|
|
}
|
|
pub mod sub {
|
|
use a::b::*;
|
|
fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
|
|
}
|
|
}
|
|
|
|
mod m1 {
|
|
fn foo() {}
|
|
}
|
|
|
|
fn main() {}
|