Fix a place that used the old Path representation

This commit is contained in:
Noah Lev 2021-10-03 12:29:17 -07:00
parent f9f3c9feb4
commit f359b316df

View File

@ -1267,8 +1267,7 @@ fn clean_qpath(hir_ty: &hir::Ty<'_>, cx: &mut DocContext<'_>) -> Type {
return normalized_value.clean(cx);
}
let segments = if p.is_global() { &p.segments[1..] } else { &p.segments };
let trait_segments = &segments[..segments.len() - 1];
let trait_segments = &p.segments[..p.segments.len() - 1];
let trait_def = cx.tcx.associated_item(p.res.def_id()).container.id();
let trait_ = self::Path {
res: Res::Def(DefKind::Trait, trait_def),