about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNoah Lev <camelidcamel@gmail.com>2022-08-09 16:08:42 -0700
committerNoah Lev <camelidcamel@gmail.com>2022-08-09 19:57:56 -0700
commitfcbdf08a86216291ff747500b7cfe4d11feb92ad (patch)
tree7dddadc826c2a6d3a07a08ccab96d8ca612f2d5c
parent93ab13b4e894ab74258c40aaf29872db2b17b6b4 (diff)
downloadrust-fcbdf08a86216291ff747500b7cfe4d11feb92ad.tar.gz
rust-fcbdf08a86216291ff747500b7cfe4d11feb92ad.zip
Add regression test for #93205
This issue was most likely fixed by #93805.
-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;
+    }
+}