rust/tests/ui/imports/issue-4366.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
431 B
Rust
Raw Normal View History

// 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::*;
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() {}