From a4b7ed7a42c716ab9f05e351f003d589124fd55d Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:18:58 +0200 Subject: Adding upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- tests/rustdoc/glob-shadowing-const.rs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 tests/rustdoc/glob-shadowing-const.rs (limited to 'tests/rustdoc/glob-shadowing-const.rs') diff --git a/tests/rustdoc/glob-shadowing-const.rs b/tests/rustdoc/glob-shadowing-const.rs new file mode 100644 index 000000000..5b786cf53 --- /dev/null +++ b/tests/rustdoc/glob-shadowing-const.rs @@ -0,0 +1,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); } -- cgit v1.2.3