]> git.lizzy.rs Git - rust.git/blob - tests/ui/imports/issue-4366-2.rs
Rollup merge of #106958 - jyn514:labels, r=m-ou-se
[rust.git] / tests / ui / imports / issue-4366-2.rs
1 // ensures that 'use foo:*' doesn't import non-public item
2
3 use m1::*;
4
5 mod foo {
6     pub fn foo() {}
7 }
8 mod a {
9     pub mod b {
10         use foo::foo;
11         type Bar = isize;
12     }
13     pub mod sub {
14         use a::b::*;
15         fn sub() -> Bar { 1 }
16         //~^ ERROR cannot find type `Bar` in this scope
17     }
18 }
19
20 mod m1 {
21     fn foo() {}
22 }
23
24 fn main() {
25     foo(); //~ ERROR expected function, found module `foo`
26 }