]> git.proxmox.com Git - rustc.git/blob - src/test/ui/issues/issue-4366.rs
New upstream version 1.48.0~beta.8+dfsg1
[rustc.git] / src / test / ui / issues / issue-4366.rs
1 // regression test for issue 4366
2
3 // ensures that 'use foo:*' doesn't import non-public 'use' statements in the
4 // module 'foo'
5
6 use m1::*;
7
8 mod foo {
9 pub fn foo() {}
10 }
11 mod a {
12 pub mod b {
13 use foo::foo;
14 type Bar = isize;
15 }
16 pub mod sub {
17 use a::b::*;
18 fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
19 }
20 }
21
22 mod m1 {
23 fn foo() {}
24 }
25
26 fn main() {}