aboutsummaryrefslogtreecommitdiff
path: root/crates
diff options
context:
space:
mode:
authorAleksey Kladov <[email protected]>2020-06-28 00:23:32 +0100
committerGitHub <[email protected]>2020-06-28 00:23:32 +0100
commita4f934efa8e37d3bc822575109d103998ecd8fe1 (patch)
tree1b7ad305a9758e4627aaf619bbdab20808fd39f9 /crates
parent3c1714d76d01b513a2e31fbeae14feca438515fa (diff)
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'crates')
-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,