about summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-01-30 14:13:27 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-02-21 11:51:56 +1100
commit23007fc9e4ad5666c65e8a598e2942c8329def0e (patch)
tree2c620ab42bf9dfa5e687f776c8142f29b4ba7cd8
parentaf75a2f7f10001da3f9d5fbda2d9cce458b7959d (diff)
downloadrust-23007fc9e4ad5666c65e8a598e2942c8329def0e.tar.gz
rust-23007fc9e4ad5666c65e8a598e2942c8329def0e.zip
Use `ThinVec` in `ast::Block`.
-rw-r--r--src/closures.rs3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/closures.rs b/src/closures.rs
index 8fd0fcf8f5c..340113866c4 100644
--- a/src/closures.rs
+++ b/src/closures.rs
@@ -1,5 +1,6 @@
 use rustc_ast::{ast, ptr};
 use rustc_span::Span;
+use thin_vec::thin_vec;
 
 use crate::attr::get_attrs_from_stmt;
 use crate::config::lists::*;
@@ -150,7 +151,7 @@ fn rewrite_closure_with_block(
     }
 
     let block = ast::Block {
-        stmts: vec![ast::Stmt {
+        stmts: thin_vec![ast::Stmt {
             id: ast::NodeId::root(),
             kind: ast::StmtKind::Expr(ptr::P(body.clone())),
             span: body.span,