summaryrefslogtreecommitdiffstats
path: root/src/test/ui/privacy/privacy2.rs
blob: c8fa436bd14fce8a7d7e79021cc4771e3af757db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#![feature(start, no_core)]
#![no_core] // makes debugging this test *a lot* easier (during resolve)

// Test to make sure that globs don't leak in regular `use` statements.

mod bar {
    pub use self::glob::*;

    pub mod glob {
        use foo;
    }
}

pub fn foo() {}

fn test1() {
    use bar::foo;
    //~^ ERROR unresolved import `bar::foo` [E0432]
    //~| no `foo` in `bar`
}

fn test2() {
    use bar::glob::foo;
    //~^ ERROR `foo` is private
}

#[start] fn main(_: isize, _: *const *const u8) -> isize { 3 }