about summary refs log tree commit diff
path: root/src/librustdoc/clean/inline.rs
diff options
context:
space:
mode:
authorShoyu Vanilla <modulo641@gmail.com>2024-02-17 14:27:05 +0900
committerShoyu Vanilla <modulo641@gmail.com>2024-02-17 14:27:05 +0900
commitf5d43a052b9eb464e54af819143467954d814a24 (patch)
treed84d8fc644f6633519ec2b30620a980f7f06a8bf /src/librustdoc/clean/inline.rs
parentc9a7db6e20c8892f770b94dd6d5a16a03721b658 (diff)
downloadrust-f5d43a052b9eb464e54af819143467954d814a24.tar.gz
rust-f5d43a052b9eb464e54af819143467954d814a24.zip
Fix missing trait impls for type in rustc docs
Diffstat (limited to 'src/librustdoc/clean/inline.rs')
-rw-r--r--src/librustdoc/clean/inline.rs19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/librustdoc/clean/inline.rs b/src/librustdoc/clean/inline.rs
index e2f2c9a5e56..03f62f41a26 100644
--- a/src/librustdoc/clean/inline.rs
+++ b/src/librustdoc/clean/inline.rs
@@ -443,11 +443,13 @@ pub(crate) fn build_impl(
             return;
         }
 
-        if let Some(stab) = tcx.lookup_stability(did)
-            && stab.is_unstable()
-            && stab.feature == sym::rustc_private
-        {
-            return;
+        if !tcx.features().rustc_private && !cx.render_options.force_unstable_if_unmarked {
+            if let Some(stab) = tcx.lookup_stability(did)
+                && stab.is_unstable()
+                && stab.feature == sym::rustc_private
+            {
+                return;
+            }
         }
     }
 
@@ -477,8 +479,11 @@ pub(crate) fn build_impl(
                 return;
             }
 
-            if let Some(stab) = tcx.lookup_stability(did) {
-                if stab.is_unstable() && stab.feature == sym::rustc_private {
+            if !tcx.features().rustc_private && !cx.render_options.force_unstable_if_unmarked {
+                if let Some(stab) = tcx.lookup_stability(did)
+                    && stab.is_unstable()
+                    && stab.feature == sym::rustc_private
+                {
                     return;
                 }
             }