about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--src/test/rustdoc/intra-doc/assoc-reexport-super.rs20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/test/rustdoc/intra-doc/assoc-reexport-super.rs b/src/test/rustdoc/intra-doc/assoc-reexport-super.rs
new file mode 100644
index 00000000000..c1dda3b4c6c
--- /dev/null
+++ b/src/test/rustdoc/intra-doc/assoc-reexport-super.rs
@@ -0,0 +1,20 @@
+// Regression test for #93205
+
+#![crate_name = "foo"]
+
+mod generated {
+    pub struct MyNewType;
+    impl MyNewType {
+        pub const FOO: Self = Self;
+    }
+}
+
+pub use generated::MyNewType;
+
+mod prelude {
+    impl super::MyNewType {
+        /// An alias for [`Self::FOO`].
+        // @has 'foo/struct.MyNewType.html' '//a[@href="struct.MyNewType.html#associatedconstant.FOO"]'
+        pub const FOO2: Self = Self::FOO;
+    }
+}