about summary refs log tree commit diff
path: root/compiler/rustc_expand/src
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-01-30 15:10:59 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-21 11:51:56 +1100
commit549f1c60af3bdd0e1e6929870d64b716e4e5c8e5 (patch)
tree45bcea968b8a6ba36d4b059f032cd3a80244f63f /compiler/rustc_expand/src
parent912b82500276bae6c1bbef2028b836edbf5ca9eb (diff)
downloadrust-549f1c60af3bdd0e1e6929870d64b716e4e5c8e5.tar.gz
rust-549f1c60af3bdd0e1e6929870d64b716e4e5c8e5.zip
Use `ThinVec` in `ast::ExprKind::Match`.
Diffstat (limited to 'compiler/rustc_expand/src')
-rw-r--r--compiler/rustc_expand/src/build.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_expand/src/build.rs b/compiler/rustc_expand/src/build.rs
index b09d3e0842f..eaecce91b8a 100644
--- a/compiler/rustc_expand/src/build.rs
+++ b/compiler/rustc_expand/src/build.rs
@@ -446,7 +446,7 @@ impl<'a> ExtCtxt<'a> {
         let err_arm = self.arm(sp, err_pat, err_expr);
 
         // `match head { Ok() => ..., Err() => ... }`
-        self.expr_match(sp, head, vec![ok_arm, err_arm])
+        self.expr_match(sp, head, thin_vec![ok_arm, err_arm])
     }
 
     pub fn pat(&self, span: Span, kind: PatKind) -> P<ast::Pat> {
@@ -516,7 +516,7 @@ impl<'a> ExtCtxt<'a> {
         self.arm(span, self.pat_wild(span), self.expr_unreachable(span))
     }
 
-    pub fn expr_match(&self, span: Span, arg: P<ast::Expr>, arms: Vec<ast::Arm>) -> P<Expr> {
+    pub fn expr_match(&self, span: Span, arg: P<ast::Expr>, arms: ThinVec<ast::Arm>) -> P<Expr> {
         self.expr(span, ast::ExprKind::Match(arg, arms))
     }