mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-02 14:51:48 +00:00
Add runnables::related_tests
This commit is contained in:
parent
a8cf346b97
commit
5d23d8bc29
4 changed files with 346 additions and 7 deletions
|
@ -86,6 +86,10 @@ impl SearchScope {
|
|||
SearchScope::new(std::iter::once((file, None)).collect())
|
||||
}
|
||||
|
||||
pub fn file_part(file: FileId, range: TextRange) -> SearchScope {
|
||||
SearchScope::new(std::iter::once((file, Some(range))).collect())
|
||||
}
|
||||
|
||||
pub fn files(files: &[FileId]) -> SearchScope {
|
||||
SearchScope::new(files.iter().map(|f| (*f, None)).collect())
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue