]> git.proxmox.com Git - rustc.git/blob - tests/ui/privacy/privacy2.rs
New upstream version 1.68.2+dfsg1
[rustc.git] / tests / ui / privacy / privacy2.rs
1 #![feature(start, no_core)]
2 #![no_core] // makes debugging this test *a lot* easier (during resolve)
3
4 // Test to make sure that globs don't leak in regular `use` statements.
5
6 mod bar {
7 pub use self::glob::*;
8
9 pub mod glob {
10 use foo;
11 }
12 }
13
14 pub fn foo() {}
15
16 fn test1() {
17 use bar::foo;
18 //~^ ERROR unresolved import `bar::foo` [E0432]
19 //~| no `foo` in `bar`
20 }
21
22 fn test2() {
23 use bar::glob::foo;
24 //~^ ERROR `foo` is private
25 }
26
27 #[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }