We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3c1714d commit a4f934eCopy full SHA for a4f934e
crates/rust-analyzer/src/handlers.rs
@@ -413,9 +413,7 @@ pub(crate) fn handle_runnables(
413
Some(offset) => {
414
let source_file = snap.analysis.parse(file_id)?;
415
algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset)
416
- .and_then(|it| it.path())
417
- .and_then(|it| it.segment())
418
- .and_then(|it| it.name_ref())
+ .and_then(|it| it.path()?.segment()?.name_ref())
419
.map_or(false, |it| it.text() == "expect")
420
}
421
None => false,
0 commit comments