summaryrefslogtreecommitdiffstats
path: root/tests/rustdoc/glob-shadowing-const.rs
blob: 5b786cf53f2987d5e5ead342f6f1af895b2e133a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// https://github.com/rust-lang/rust/pull/83872#issuecomment-820101008
#![crate_name="foo"]

mod sub4 {
    /// 0
    pub const X: usize = 0;
    pub mod inner {
        pub use super::*;
        /// 1
        pub const X: usize = 1;
    }
}

#[doc(inline)]
pub use sub4::inner::*;

// @has 'foo/index.html'
// @has - '//div[@class="item-right docblock-short"]' '1'
// @!has - '//div[@class="item-right docblock-short"]' '0'
fn main() { assert_eq!(X, 1); }