Small cleanups
This commit is contained in:
parent
0acaa5af6b
commit
a52341d784
1 changed files with 4 additions and 15 deletions
|
@ -504,15 +504,9 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
|
||||||
match res {
|
match res {
|
||||||
// FIXME(#76467): make this fallthrough to lookup the associated
|
// FIXME(#76467): make this fallthrough to lookup the associated
|
||||||
// item a separate function.
|
// item a separate function.
|
||||||
Res::Def(DefKind::AssocFn | DefKind::AssocConst, _) => {
|
Res::Def(DefKind::AssocFn | DefKind::AssocConst, _) => assert_eq!(ns, ValueNS),
|
||||||
assert_eq!(ns, ValueNS);
|
Res::Def(DefKind::AssocTy, _) => assert_eq!(ns, TypeNS),
|
||||||
}
|
Res::Def(DefKind::Variant, _) => return handle_variant(cx, res, extra_fragment),
|
||||||
Res::Def(DefKind::AssocTy, _) => {
|
|
||||||
assert_eq!(ns, TypeNS);
|
|
||||||
}
|
|
||||||
Res::Def(DefKind::Variant, _) => {
|
|
||||||
return handle_variant(cx, res, extra_fragment);
|
|
||||||
}
|
|
||||||
// Not a trait item; just return what we found.
|
// Not a trait item; just return what we found.
|
||||||
Res::Primitive(ty) => {
|
Res::Primitive(ty) => {
|
||||||
if extra_fragment.is_some() {
|
if extra_fragment.is_some() {
|
||||||
|
@ -522,12 +516,7 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
|
||||||
}
|
}
|
||||||
return Ok((res, Some(ty.as_str().to_owned())));
|
return Ok((res, Some(ty.as_str().to_owned())));
|
||||||
}
|
}
|
||||||
Res::Def(DefKind::Mod, _) => {
|
_ => return Ok((res, extra_fragment.clone())),
|
||||||
return Ok((res, extra_fragment.clone()));
|
|
||||||
}
|
|
||||||
_ => {
|
|
||||||
return Ok((res, extra_fragment.clone()));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue