]> git.lizzy.rs Git - rust.git/blob - src/test/ui/glob-resolve1.rs
Rollup merge of #56217 - frewsxcv:frewsxcv-float-parse, r=QuietMisdreavus
[rust.git] / src / test / ui / glob-resolve1.rs
1 // Make sure that globs only bring in public things.
2
3 use bar::*;
4
5 mod bar {
6     use self::fpriv as import;
7     fn fpriv() {}
8     extern {
9         fn epriv();
10     }
11     enum A { A1 }
12     pub enum B { B1 }
13
14     struct C;
15
16     type D = isize;
17 }
18
19 fn foo<T>() {}
20
21 fn main() {
22     fpriv(); //~ ERROR cannot find function `fpriv` in this scope
23     epriv(); //~ ERROR cannot find function `epriv` in this scope
24     B; //~ ERROR expected value, found enum `B`
25     C; //~ ERROR cannot find value `C` in this scope
26     import(); //~ ERROR: cannot find function `import` in this scope
27
28     foo::<A>(); //~ ERROR: cannot find type `A` in this scope
29     foo::<C>(); //~ ERROR: cannot find type `C` in this scope
30     foo::<D>(); //~ ERROR: cannot find type `D` in this scope
31 }