diff --git a/crates/ide/src/inlay_hints/closing_brace.rs b/crates/ide/src/inlay_hints/closing_brace.rs index 9b7e708848..8f2777f392 100644 --- a/crates/ide/src/inlay_hints/closing_brace.rs +++ b/crates/ide/src/inlay_hints/closing_brace.rs @@ -65,15 +65,9 @@ pub(super) fn hints( ast::BlockExpr(block_expr) => { block = block_expr.stmt_list()?; }, - ast::LoopExpr(loop_expr) => { + ast::AnyHasLoopBody(loop_expr) => { block = loop_expr.loop_body()?.stmt_list()?; }, - ast::WhileExpr(while_expr) => { - block = while_expr.loop_body()?.stmt_list()?; - }, - ast::ForExpr(for_expr) => { - block = for_expr.loop_body()?.stmt_list()?; - }, _ => return None, } }