Skip to content

Commit d92d642

Browse files
committed
rustdoc: add another test case for glob shadowing
1 parent c1aea94 commit d92d642

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
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); }

0 commit comments

Comments
 (0)