From 57450c637c9ea45023c438f2b6ef5c8cd637e6e6 Mon Sep 17 00:00:00 2001 From: Michael Howell Date: Wed, 1 Jun 2022 08:40:19 -0700 Subject: [PATCH] Update src/librustdoc/passes/collect_trait_impls.rs Co-authored-by: Guillaume Gomez --- src/librustdoc/passes/collect_trait_impls.rs | 8 +++++--- 1 file 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 @@ // 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, }