mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-30 18:53:39 +00:00
rustdoc: Get symbol for TyParam
directly
This commit is contained in:
parent
df281ee57b
commit
0bb1c285af
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user