about summary refs log tree commit diff
path: root/compiler/rustc_ast_lowering/src
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2022-06-03 23:29:30 +0000
committerbors <bors@rust-lang.org>2022-06-03 23:29:30 +0000
commitf15370b4e44988ad5d228b25e939650c0a6c2ec7 (patch)
treed305cde9c2015da579fbd0b17050b881c1dae6c5 /compiler/rustc_ast_lowering/src
parenta6b8c6954829669a5c4fa320c3e6132edf04fcfc (diff)
parentb051fcaefe2f783394a2e63632e7a0932197a889 (diff)
downloadrust-f15370b4e44988ad5d228b25e939650c0a6c2ec7.tar.gz
rust-f15370b4e44988ad5d228b25e939650c0a6c2ec7.zip
Auto merge of #97670 - spastorino:simplify-universal-impl-trait-lowering2, r=Dylan-DPC
Make params be SmallVec as originally was

r? `@cjgillot`
It was originally a [`SmallVec`](https://github.com/rust-lang/rust/pull/97598/files#diff-0a61b538a3cec072c76fecae4635af6a12ec3256860029ac70549c2aa53ab394L1497), I've mistakenly changed it [here](https://github.com/rust-lang/rust/pull/97598/files#diff-0a61b538a3cec072c76fecae4635af6a12ec3256860029ac70549c2aa53ab394R1377) to a `Vec`
Diffstat (limited to 'compiler/rustc_ast_lowering/src')
-rw-r--r--compiler/rustc_ast_lowering/src/item.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/compiler/rustc_ast_lowering/src/item.rs b/compiler/rustc_ast_lowering/src/item.rs
index 85d3bf66d8e..bcbd0b655eb 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);