mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-11-19 03:28:36 +00:00
internal: port rust-analyzer to new Salsa
This commit is contained in:
parent
394374e769
commit
74620e64ec
161 changed files with 3075 additions and 2331 deletions
|
|
@ -1,3 +1,4 @@
|
|||
use salsa::AsDynDatabase;
|
||||
use stdx::trim_indent;
|
||||
use test_fixture::WithFixture;
|
||||
use test_utils::{assert_eq_text, CURSOR_MARKER};
|
||||
|
|
@ -1250,9 +1251,15 @@ 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