summaryrefslogtreecommitdiff
path: root/tests/rustdoc-ui
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-02-11 19:14:25 +0400
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2023-03-23 16:19:59 +0400
commitbec4eab3f972495df32b4861a3117ef16d73a018 (patch)
tree44961ca125f7762b35742ce9536d2057774192e8 /tests/rustdoc-ui
parent84dd6dfd9d19176cc3c94bc1448a841e44d57890 (diff)
downloadrust-bec4eab3f972495df32b4861a3117ef16d73a018.tar.gz
rustdoc: Skip doc link resolution for non-exported items
Diffstat (limited to 'tests/rustdoc-ui')
-rw-r--r--tests/rustdoc-ui/intra-doc/reachable-non-exported.rs13
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs b/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs
new file mode 100644
index 00000000000..6afcad4f921
--- /dev/null
+++ b/tests/rustdoc-ui/intra-doc/reachable-non-exported.rs
@@ -0,0 +1,13 @@
+// The structure is reachable, but not exported, so rustdoc
+// doesn't attempt to request doc link resolutions on it.
+
+// check-pass
+
+mod private {
+ /// [core::str::FromStr]
+ pub struct ReachableButNotExported;
+}
+
+pub fn foo() -> private::ReachableButNotExported {
+ private::ReachableButNotExported
+}