]> git.lizzy.rs Git - rust.git/blob - tests/rustdoc/glob-shadowing-const.rs
Rollup merge of #106605 - notriddle:notriddle/outdated-rustbook, r=GuillaumeGomez
[rust.git] / tests / rustdoc / glob-shadowing-const.rs
1 // https://github.com/rust-lang/rust/pull/83872#issuecomment-820101008
2 #![crate_name="foo"]
3
4 mod sub4 {
5     /// 0
6     pub const X: usize = 0;
7     pub mod inner {
8         pub use super::*;
9         /// 1
10         pub const X: usize = 1;
11     }
12 }
13
14 #[doc(inline)]
15 pub use sub4::inner::*;
16
17 // @has 'foo/index.html'
18 // @has - '//div[@class="item-right docblock-short"]' '1'
19 // @!has - '//div[@class="item-right docblock-short"]' '0'
20 fn main() { assert_eq!(X, 1); }