Use is_unsafe_block()
This commit is contained in:
parent
81cd12cc08
commit
e4f13dfdd6
1 changed files with 1 additions and 2 deletions
|
@ -630,8 +630,7 @@ fn rewrite_closure(
|
|||
}
|
||||
|
||||
// Figure out if the block is necessary.
|
||||
let needs_block = block.rules != ast::BlockCheckMode::Default || block.stmts.len() > 1
|
||||
|| context.inside_macro
|
||||
let needs_block = is_unsafe_block(block) || block.stmts.len() > 1 || context.inside_macro
|
||||
|| block_contains_comment(block, context.codemap)
|
||||
|| prefix.contains('\n');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue