mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 11:35:16 +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
|
|
@ -1,4 +1,3 @@
|
|||
use salsa::AsDynDatabase;
|
||||
use stdx::trim_indent;
|
||||
use test_fixture::WithFixture;
|
||||
use test_utils::{CURSOR_MARKER, assert_eq_text};
|
||||
|
|
@ -1252,14 +1251,10 @@ fn check_with_config(
|
|||
let (db, file_id, pos) = if ra_fixture_before.contains(CURSOR_MARKER) {
|
||||
let (db, file_id, range_or_offset) = RootDatabase::with_range_or_offset(ra_fixture_before);
|
||||
|
||||
let file_id = crate::base_db::EditionedFileId::new(db.as_dyn_database(), file_id);
|
||||
|
||||
(db, file_id, Some(range_or_offset))
|
||||
} else {
|
||||
let (db, file_id) = RootDatabase::with_single_file(ra_fixture_before);
|
||||
|
||||
let file_id = crate::base_db::EditionedFileId::new(db.as_dyn_database(), file_id);
|
||||
|
||||
(db, file_id, None)
|
||||
};
|
||||
let sema = &Semantics::new(&db);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue