]> git.lizzy.rs Git - rust.git/blob - src/test/ui/imports/issue-4366-2.rs
Sync portable-simd to rust-lang/portable-simd@72df4c45056a8bc0d1b3f06fdc828722177f0763
[rust.git] / src / test / 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 }