about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2024-08-05 13:58:01 +0200
committerGitHub <noreply@github.com>2024-08-05 13:58:01 +0200
commitf12aca95e4badcb079c2615b55f1c85e845b22e7 (patch)
tree252d1841e1c68bdc51a5e314222511bcdd0e9a80
parenta95ff26fdcb065dbd03bda0e9a69423338bb335f (diff)
downloadrust-f12aca95e4badcb079c2615b55f1c85e845b22e7.tar.gz
rust-f12aca95e4badcb079c2615b55f1c85e845b22e7.zip
Simplify
-rw-r--r--src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs b/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs
index 9b7e708848b..8f2777f3928 100644
--- a/src/tools/rust-analyzer/crates/ide/src/inlay_hints/closing_brace.rs
+++ b/src/tools/rust-analyzer/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,
             }
         }