rustdoc: Get symbol for TyParam directly

This commit is contained in:
Noah Lev 2021-08-22 18:53:00 -07:00
parent df281ee57b
commit 0bb1c285af

View File

@ -414,7 +414,7 @@ crate fn resolve_type(cx: &mut DocContext<'_>, path: Path, id: hir::HirId) -> Ty
return Generic(kw::SelfUpper);
}
Res::Def(DefKind::TyParam, _) if path.segments.len() == 1 => {
return Generic(Symbol::intern(&path.whole_name()));
return Generic(path.segments[0].name);
}
Res::SelfTy(..) | Res::Def(DefKind::TyParam | DefKind::AssocTy, _) => true,
_ => false,