]> git.proxmox.com Git - rustc.git/blame - src/test/ui/issues/issue-4366.rs
New upstream version 1.49.0+dfsg1
[rustc.git] / src / test / ui / issues / issue-4366.rs
CommitLineData
223e47cc
LB
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
6use m1::*;
7
8mod foo {
9 pub fn foo() {}
10}
11mod a {
12 pub mod b {
13 use foo::foo;
0731742a 14 type Bar = isize;
223e47cc
LB
15 }
16 pub mod sub {
17 use a::b::*;
32a655c1 18 fn sub() -> isize { foo(); 1 } //~ ERROR cannot find function `foo` in this scope
223e47cc
LB
19 }
20}
21
22mod m1 {
23 fn foo() {}
24}
25
1a4d82fc 26fn main() {}