]> git.lizzy.rs Git - rust.git/blob - tests/ui/imports/issue-4366.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / imports / 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() {}