Update src/librustdoc/passes/collect_trait_impls.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
This commit is contained in:
parent
f5ac93b94b
commit
57450c637c
@ -101,9 +101,11 @@
|
||||
// form that is valid for use in type inference.
|
||||
let ty = tcx.type_of(def_id);
|
||||
match ty.kind() {
|
||||
ty::Slice(ty) => matches!(ty.kind(), ty::Param(..)),
|
||||
ty::Ref(_region, ty, _mutbl) => matches!(ty.kind(), ty::Param(..)),
|
||||
ty::RawPtr(ty::TypeAndMut { ty, .. }) => matches!(ty.kind(), ty::Param(..)),
|
||||
ty::Slice(ty)
|
||||
| ty::Ref(_, ty, _)
|
||||
| ty::RawPtr(ty::TypeAndMut { ty, .. }) => {
|
||||
matches!(ty.kind(), ty::Param(..))
|
||||
}
|
||||
ty::Tuple(tys) => tys.iter().all(|ty| matches!(ty.kind(), ty::Param(..))),
|
||||
_ => true,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user