about summary refs log tree commit diff
path: root/tests/rustdoc/constant/glob-shadowing-const.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/rustdoc/constant/glob-shadowing-const.rs')
-rw-r--r--tests/rustdoc/constant/glob-shadowing-const.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/rustdoc/constant/glob-shadowing-const.rs b/tests/rustdoc/constant/glob-shadowing-const.rs
new file mode 100644
index 00000000000..fbc22dbccaa
--- /dev/null
+++ b/tests/rustdoc/constant/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 - '//dd' '1'
+//@ !has - '//dd' '0'
+fn main() { assert_eq!(X, 1); }