From 23007fc9e4ad5666c65e8a598e2942c8329def0e Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Mon, 30 Jan 2023 14:13:27 +1100 Subject: [PATCH] Use `ThinVec` in `ast::Block`. --- src/closures.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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,