mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-26 13:03:31 +00:00
Update crates/rust-analyzer/src/handlers.rs
Co-authored-by: Veetaha <veetaha2@gmail.com>
This commit is contained in:
parent
3c1714d76d
commit
a4f934efa8
1 changed files with 1 additions and 3 deletions
|
@ -413,9 +413,7 @@ pub(crate) fn handle_runnables(
|
|||
Some(offset) => {
|
||||
let source_file = snap.analysis.parse(file_id)?;
|
||||
algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset)
|
||||
.and_then(|it| it.path())
|
||||
.and_then(|it| it.segment())
|
||||
.and_then(|it| it.name_ref())
|
||||
.and_then(|it| it.path()?.segment()?.name_ref())
|
||||
.map_or(false, |it| it.text() == "expect")
|
||||
}
|
||||
None => false,
|
||||
|
|
Loading…
Reference in a new issue