]> git.proxmox.com Git - rustc.git/blame - src/test/ui/glob-resolve1.rs
New upstream version 1.40.0+dfsg1
[rustc.git] / src / test / ui / glob-resolve1.rs
CommitLineData
1a4d82fc
JJ
1// Make sure that globs only bring in public things.
2
3use bar::*;
4
5mod 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
19fn foo<T>() {}
20
21fn main() {
32a655c1
SL
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
1a4d82fc 31}