Skip to content

Commit e4f13df

Browse files
committed
Use is_unsafe_block()
1 parent 81cd12c commit e4f13df

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/expr.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,7 @@ fn rewrite_closure(
630630
}
631631

632632
// Figure out if the block is necessary.
633-
let needs_block = block.rules != ast::BlockCheckMode::Default || block.stmts.len() > 1
634-
|| context.inside_macro
633+
let needs_block = is_unsafe_block(block) || block.stmts.len() > 1 || context.inside_macro
635634
|| block_contains_comment(block, context.codemap)
636635
|| prefix.contains('\n');
637636

0 commit comments

Comments
 (0)