Skip to content

Commit 57450c6

Browse files
Update src/librustdoc/passes/collect_trait_impls.rs
Co-authored-by: Guillaume Gomez <[email protected]>
1 parent f5ac93b commit 57450c6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

src/librustdoc/passes/collect_trait_impls.rs

+5-3
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,11 @@ crate fn collect_trait_impls(mut krate: Crate, cx: &mut DocContext<'_>) -> Crate
101101
// form that is valid for use in type inference.
102102
let ty = tcx.type_of(def_id);
103103
match ty.kind() {
104-
ty::Slice(ty) => matches!(ty.kind(), ty::Param(..)),
105-
ty::Ref(_region, ty, _mutbl) => matches!(ty.kind(), ty::Param(..)),
106-
ty::RawPtr(ty::TypeAndMut { ty, .. }) => matches!(ty.kind(), ty::Param(..)),
104+
ty::Slice(ty)
105+
| ty::Ref(_, ty, _)
106+
| ty::RawPtr(ty::TypeAndMut { ty, .. }) => {
107+
matches!(ty.kind(), ty::Param(..))
108+
}
107109
ty::Tuple(tys) => tys.iter().all(|ty| matches!(ty.kind(), ty::Param(..))),
108110
_ => true,
109111
}

0 commit comments

Comments
 (0)