summaryrefslogtreecommitdiff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-03-18 19:18:51 +0400
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-03-21 17:36:57 +0400
commitd3a55419391ab2d5b75b8c8107b37459ca9b2b83 (patch)
treeefa2186a874cf0df5973362f11b43807c338bb9b /tests/rustdoc-ui
parentef03fda339923e659d3d3ca3321de887316d2807 (diff)
downloadrust-d3a55419391ab2d5b75b8c8107b37459ca9b2b83.tar.gz
rustdoc: Cleanup parent module tracking for doc links
Keep ids of the documented items themselves, not their parent modules. Parent modules can be retreived from those ids when necessary.
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/intra-doc/auxiliary/inner-crate-doc.rs1
-rw-r--r--tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs10
2 files changed, 11 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/auxiliary/inner-crate-doc.rs b/tests/rustdoc-ui/intra-doc/auxiliary/inner-crate-doc.rs
new file mode 100644
index 00000000000..15bf51e6f8e
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/auxiliary/inner-crate-doc.rs
@@ -0,0 +1 @@
+//! Inner doc comment
diff --git a/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs b/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs
new file mode 100644
index 00000000000..4d6a3256645
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/import-inline-merge-module.rs
@@ -0,0 +1,10 @@
+// Test for issue #108501.
+// Module parent scope doesn't hijack import's parent scope for the import's doc links.
+
+// check-pass
+// aux-build: inner-crate-doc.rs
+// compile-flags: --extern inner_crate_doc --edition 2018
+
+/// Import doc comment [inner_crate_doc]
+#[doc(inline)]
+pub use inner_crate_doc;