diff options
| author | Michael Howell <michael@notriddle.com> | 2022-06-01 08:40:19 -0700 |
|---|---|---|
| committer | Michael Howell <michael@notriddle.com> | 2022-06-01 09:55:33 -0700 |
| commit | 57450c637c9ea45023c438f2b6ef5c8cd637e6e6 (patch) | |
| tree | 5a56196cff28db031180b6295fa0c3607f18aa7b | |
| parent | f5ac93b94b611bd9193b81c7eae85a3afe835549 (diff) | |
| download | rust-57450c637c9ea45023c438f2b6ef5c8cd637e6e6.tar.gz rust-57450c637c9ea45023c438f2b6ef5c8cd637e6e6.zip | |
Update src/librustdoc/passes/collect_trait_impls.rs
Co-authored-by: Guillaume Gomez <guillaume1.gomez@gmail.com>
| -rw-r--r-- | src/librustdoc/passes/collect_trait_impls.rs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/librustdoc/passes/collect_trait_impls.rs b/src/librustdoc/passes/collect_trait_impls.rs index 0dc1c9d9663..a042a68a2a1 100644 --- a/src/librustdoc/passes/collect_trait_impls.rs +++ b/src/librustdoc/passes/collect_trait_impls.rs @@ -101,9 +101,11 @@ crate fn collect_trait_impls(mut krate: Crate, cx: &mut DocContext<'_>) -> Crate // 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, } |
