about summary refs log tree commit diff
path: root/src/librustdoc/clean/mod.rs
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2025-04-11 04:25:25 +0000
committerMichael Goulet <michael@errs.io>2025-07-04 18:26:09 +0000
commit74570e526e6816b04c479a34dc1f2116e121e798 (patch)
tree7ee1f2918f3b49bd9f4f9a552e9440ddc3adf2d4 /src/librustdoc/clean/mod.rs
parent42c9bfd2b96f2e6cd0e4e6fab21c2d5499883089 (diff)
downloadrust-74570e526e6816b04c479a34dc1f2116e121e798.tar.gz
rust-74570e526e6816b04c479a34dc1f2116e121e798.zip
Same for types
Diffstat (limited to 'src/librustdoc/clean/mod.rs')
-rw-r--r--src/librustdoc/clean/mod.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/librustdoc/clean/mod.rs b/src/librustdoc/clean/mod.rs
index 68dea4616f9..5cd5c434521 100644
--- a/src/librustdoc/clean/mod.rs
+++ b/src/librustdoc/clean/mod.rs
@@ -2221,7 +2221,7 @@ pub(crate) fn clean_middle_ty<'tcx>(
         }
 
         ty::Bound(_, ref ty) => match ty.kind {
-            ty::BoundTyKind::Param(_, name) => Generic(name),
+            ty::BoundTyKind::Param(def_id) => Generic(cx.tcx.item_name(def_id)),
             ty::BoundTyKind::Anon => panic!("unexpected anonymous bound type variable"),
         },
 
@@ -3192,7 +3192,8 @@ fn clean_bound_vars<'tcx>(
                     None
                 }
             }
-            ty::BoundVariableKind::Ty(ty::BoundTyKind::Param(def_id, name)) => {
+            ty::BoundVariableKind::Ty(ty::BoundTyKind::Param(def_id)) => {
+                let name = cx.tcx.item_name(def_id);
                 Some(GenericParamDef {
                     name,
                     def_id,