We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
ThinVec
ast::Block
1 parent af75a2f commit 23007fcCopy full SHA for 23007fc
src/closures.rs
@@ -1,5 +1,6 @@
1
use rustc_ast::{ast, ptr};
2
use rustc_span::Span;
3
+use thin_vec::thin_vec;
4
5
use crate::attr::get_attrs_from_stmt;
6
use crate::config::lists::*;
@@ -150,7 +151,7 @@ fn rewrite_closure_with_block(
150
151
}
152
153
let block = ast::Block {
- stmts: vec![ast::Stmt {
154
+ stmts: thin_vec![ast::Stmt {
155
id: ast::NodeId::root(),
156
kind: ast::StmtKind::Expr(ptr::P(body.clone())),
157
span: body.span,
0 commit comments