From b051fcaefe2f783394a2e63632e7a0932197a889 Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Thu, 2 Jun 2022 23:42:49 -0300 Subject: [PATCH] Make params be SmallVec as originally was --- compiler/rustc_ast_lowering/src/item.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs index 85d3bf66d8e1c..bcbd0b655eb29 100644 --- a/compiler/rustc_ast_lowering/src/item.rs +++ b/compiler/rustc_ast_lowering/src/item.rs @@ -1374,7 +1374,8 @@ impl<'hir> LoweringContext<'_, 'hir> { .map(|predicate| self.lower_where_predicate(predicate)), ); - let mut params: Vec<_> = self.lower_generic_params_mut(&generics.params).collect(); + let mut params: SmallVec<[hir::GenericParam<'hir>; 4]> = + self.lower_generic_params_mut(&generics.params).collect(); let has_where_clause = !generics.where_clause.predicates.is_empty(); let where_clause_span = self.lower_span(generics.where_clause.span); let span = self.lower_span(generics.span);