about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <476013+matthiaskrgr@users.noreply.github.com>2025-09-23 18:13:55 +0200
committerGitHub <noreply@github.com>2025-09-23 18:13:55 +0200
commit6d152339da9b209ebff8fd72d152972535ad0e5a (patch)
treefac8c6092addf90cca512d0e6c02ec17cfc50278
parent15c323fa6dde15d75e1aaf6597aaf6a9bcc083a9 (diff)
parentbd98e73fe0da34a9c57cf87f3ac248a2e653f970 (diff)
downloadrust-6d152339da9b209ebff8fd72d152972535ad0e5a.tar.gz
rust-6d152339da9b209ebff8fd72d152972535ad0e5a.zip
Rollup merge of #146806 - el-ev:issue60926, r=lolbinarycat
add private module override re-export test

- Closes rust-lang/rust#60926

Added a new test to check that `rustdoc` does not create links to `m2` in the crate root when `pub use m1::*` is overrided by `use crate::m1::m2`.
-rw-r--r--tests/rustdoc/reexport/private-mod-override-reexport.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc/reexport/private-mod-override-reexport.rs b/tests/rustdoc/reexport/private-mod-override-reexport.rs
new file mode 100644
index 00000000000..849acc5fdae
--- /dev/null
+++ b/tests/rustdoc/reexport/private-mod-override-reexport.rs
@@ -0,0 +1,13 @@
+// https://github.com/rust-lang/rust/issues/60926
+#![crate_name = "foo"]
+
+mod m1 {
+    pub mod m2 {
+        pub struct Foo;
+    }
+}
+
+pub use m1::*;
+use crate::m1::m2;
+
+//@ count foo/index.html '//a[@class="mod"]' 0