From 48ea298abfbab541c34c95481a0466ab91b08e55 Mon Sep 17 00:00:00 2001 From: Oli Scherer Date: Thu, 17 Nov 2022 15:39:11 +0000 Subject: [PATCH] Remove a redundant assert --- compiler/rustc_trait_selection/src/infer.rs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/compiler/rustc_trait_selection/src/infer.rs b/compiler/rustc_trait_selection/src/infer.rs index 5be49996a0b2..af17c86e1a5f 100644 --- a/compiler/rustc_trait_selection/src/infer.rs +++ b/compiler/rustc_trait_selection/src/infer.rs @@ -119,12 +119,6 @@ fn type_implements_trait( ) -> traits::EvaluationResult { let trait_ref = self.tcx.mk_trait_ref(trait_def_id, self_ty, params); - debug_assert_eq!( - self.tcx.generics_of(trait_def_id).count() - 1, - params.len(), - "wrong number of generic parameters for {trait_def_id:?}, did you accidentally include the self-type in the params list?" - ); - let obligation = traits::Obligation { cause: traits::ObligationCause::dummy(), param_env,