diff options
| author | Michael Goulet <michael@errs.io> | 2025-04-11 04:25:25 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-07-04 18:26:09 +0000 |
| commit | 74570e526e6816b04c479a34dc1f2116e121e798 (patch) | |
| tree | 7ee1f2918f3b49bd9f4f9a552e9440ddc3adf2d4 /src/librustdoc/clean/mod.rs | |
| parent | 42c9bfd2b96f2e6cd0e4e6fab21c2d5499883089 (diff) | |
| download | rust-74570e526e6816b04c479a34dc1f2116e121e798.tar.gz rust-74570e526e6816b04c479a34dc1f2116e121e798.zip | |
Same for types
Diffstat (limited to 'src/librustdoc/clean/mod.rs')
| -rw-r--r-- | src/librustdoc/clean/mod.rs | 5 |
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, |
