about summary refs log tree commit diff
path: root/tests/ui/cfg/diagnostics-reexport.rs
blob: c6a714fca718e08648ed2232e1d183c078ae9d8e (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
28
29
30
31
32
33
34
35
36
37
38
39
40
pub mod inner {
    #[cfg(false)]
    mod gone {
        pub fn uwu() {}
    }

    #[cfg(false)] //~ NOTE the item is gated here
    pub use super::uwu;
    //~^ NOTE found an item that was configured out
}

pub use a::x;
//~^ ERROR unresolved import `a::x`
//~| NOTE no `x` in `a`

mod a {
    #[cfg(false)] //~ NOTE the item is gated here
    pub fn x() {}
    //~^ NOTE found an item that was configured out
}

pub use b::{x, y};
//~^ ERROR unresolved imports `b::x`, `b::y`
//~| NOTE no `x` in `b`
//~| NOTE no `y` in `b`

mod b {
    #[cfg(false)] //~ NOTE the item is gated here
    pub fn x() {}
    //~^ NOTE found an item that was configured out
    #[cfg(false)] //~ NOTE the item is gated here
    pub fn y() {}
    //~^ NOTE found an item that was configured out
}

fn main() {
    // There is no uwu at this path, but there's one in a cgfd out sub-module, so we mention it.
    inner::uwu(); //~ ERROR cannot find function
    //~^ NOTE not found in `inner`
}