Skip to content

Commit 747f2d1

Browse files
committed
fix: Do not wrap inlined local in parens when at block tail position
1 parent f750eeb commit 747f2d1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

crates/ide_assists/src/handlers/inline_local_variable.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ pub(crate) fn inline_local_variable(acc: &mut Assists, ctx: &AssistContext) -> O
107107
| ast::Expr::BreakExpr(_)
108108
| ast::Expr::ReturnExpr(_)
109109
| ast::Expr::MatchExpr(_)
110+
| ast::Expr::BlockExpr(_)
110111
);
111112
Some((range, name_ref, !(initializer || parent)))
112113
})

0 commit comments

Comments
 (0)