aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--crates/rust-analyzer/src/handlers.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs
index 4d0684b2a..615aa2eb0 100644
--- a/crates/rust-analyzer/src/handlers.rs
+++ b/crates/rust-analyzer/src/handlers.rs
@@ -413,9 +413,7 @@ pub(crate) fn handle_runnables(
413 Some(offset) => { 413 Some(offset) => {
414 let source_file = snap.analysis.parse(file_id)?; 414 let source_file = snap.analysis.parse(file_id)?;
415 algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset) 415 algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset)
416 .and_then(|it| it.path()) 416 .and_then(|it| it.path()?.segment()?.name_ref())
417 .and_then(|it| it.segment())
418 .and_then(|it| it.name_ref())
419 .map_or(false, |it| it.text() == "expect") 417 .map_or(false, |it| it.text() == "expect")
420 } 418 }
421 None => false, 419 None => false,