aboutsummaryrefslogtreecommitdiff
path: root/crates/ide/src
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ide/src')
-rw-r--r--crates/ide/src/diagnostics/fixes.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/crates/ide/src/diagnostics/fixes.rs b/crates/ide/src/diagnostics/fixes.rs
index c235b5bf4..ba046232a 100644
--- a/crates/ide/src/diagnostics/fixes.rs
+++ b/crates/ide/src/diagnostics/fixes.rs
@@ -16,7 +16,7 @@ use ide_db::{
16use syntax::{ 16use syntax::{
17 algo, 17 algo,
18 ast::{self, edit::IndentLevel, make}, 18 ast::{self, edit::IndentLevel, make},
19 AstNode, Direction, T, 19 AstNode,
20}; 20};
21use text_edit::TextEdit; 21use text_edit::TextEdit;
22 22
@@ -110,9 +110,9 @@ impl DiagnosticWithFix for RemoveThisSemicolon {
110 .expr 110 .expr
111 .to_node(&root) 111 .to_node(&root)
112 .syntax() 112 .syntax()
113 .siblings_with_tokens(Direction::Next) 113 .parent()
114 .filter_map(|it| it.into_token()) 114 .and_then(ast::ExprStmt::cast)
115 .find(|it| it.kind() == T![;])? 115 .and_then(|expr| expr.semicolon_token())?
116 .text_range(); 116 .text_range();
117 117
118 let edit = TextEdit::delete(semicolon); 118 let edit = TextEdit::delete(semicolon);