mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 22:54:58 +00:00
Add file support to expect
This commit is contained in:
parent
82838f5eda
commit
adf624b433
3 changed files with 63 additions and 21 deletions
|
@ -415,7 +415,7 @@ pub(crate) fn handle_runnables(
|
|||
let source_file = snap.analysis.parse(file_id)?;
|
||||
algo::find_node_at_offset::<ast::MacroCall>(source_file.syntax(), offset)
|
||||
.and_then(|it| it.path()?.segment()?.name_ref())
|
||||
.map_or(false, |it| it.text() == "expect")
|
||||
.map_or(false, |it| it.text() == "expect" || it.text() == "expect_file")
|
||||
}
|
||||
None => false,
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue