mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-29 10:58:02 +00:00
Make HirFileId, EditionedFileId and macro files Salsa struct
And make more queries non-interned. Also flip the default for queries, now the default is to not intern and to intern a query you need to say `invoke_interned`.
This commit is contained in:
parent
02ade79631
commit
c58ddafe90
195 changed files with 1473 additions and 1525 deletions
|
|
@ -4,8 +4,8 @@ use arrayvec::ArrayVec;
|
|||
use ast::HasName;
|
||||
use cfg::{CfgAtom, CfgExpr};
|
||||
use hir::{
|
||||
AsAssocItem, AttrsWithOwner, HasAttrs, HasCrate, HasSource, HirFileIdExt, ModPath, Name,
|
||||
PathKind, Semantics, Symbol, db::HirDatabase, sym, symbols::FxIndexSet,
|
||||
AsAssocItem, AttrsWithOwner, HasAttrs, HasCrate, HasSource, ModPath, Name, PathKind, Semantics,
|
||||
Symbol, db::HirDatabase, sym, symbols::FxIndexSet,
|
||||
};
|
||||
use ide_assists::utils::{has_test_related_attribute, test_related_attribute_syn};
|
||||
use ide_db::{
|
||||
|
|
@ -285,8 +285,10 @@ fn find_related_tests_in_module(
|
|||
|
||||
let file_id = mod_source.file_id.original_file(sema.db);
|
||||
let mod_scope = SearchScope::file_range(hir::FileRange { file_id, range: mod_source.value });
|
||||
let fn_pos =
|
||||
FilePosition { file_id: file_id.into(), offset: fn_name.syntax().text_range().start() };
|
||||
let fn_pos = FilePosition {
|
||||
file_id: file_id.file_id(sema.db),
|
||||
offset: fn_name.syntax().text_range().start(),
|
||||
};
|
||||
find_related_tests(sema, syntax, fn_pos, Some(mod_scope), tests)
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue