mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 20:42:04 +00:00
Re-export base_db from ide_db
This commit is contained in:
parent
2c787676c9
commit
19cce08662
52 changed files with 69 additions and 74 deletions
|
@ -1,6 +1,6 @@
|
|||
use crate::{MatchFinder, SsrRule};
|
||||
use base_db::{salsa::Durability, FileId, FilePosition, FileRange, SourceDatabaseExt};
|
||||
use expect_test::{expect, Expect};
|
||||
use ide_db::base_db::{salsa::Durability, FileId, FilePosition, FileRange, SourceDatabaseExt};
|
||||
use rustc_hash::FxHashSet;
|
||||
use std::sync::Arc;
|
||||
use test_utils::{mark, RangeOrOffset};
|
||||
|
@ -62,7 +62,7 @@ fn parser_undefined_placeholder_in_replacement() {
|
|||
/// `code` may optionally contain a cursor marker `<|>`. If it doesn't, then the position will be
|
||||
/// the start of the file. If there's a second cursor marker, then we'll return a single range.
|
||||
pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Vec<FileRange>) {
|
||||
use base_db::fixture::WithFixture;
|
||||
use ide_db::base_db::fixture::WithFixture;
|
||||
use ide_db::symbol_index::SymbolsDatabase;
|
||||
let (mut db, file_id, range_or_offset) = if code.contains(test_utils::CURSOR_MARKER) {
|
||||
ide_db::RootDatabase::with_range_or_offset(code)
|
||||
|
@ -83,7 +83,7 @@ pub(crate) fn single_file(code: &str) -> (ide_db::RootDatabase, FilePosition, Ve
|
|||
}
|
||||
}
|
||||
let mut local_roots = FxHashSet::default();
|
||||
local_roots.insert(base_db::fixture::WORKSPACE);
|
||||
local_roots.insert(ide_db::base_db::fixture::WORKSPACE);
|
||||
db.set_local_roots_with_durability(Arc::new(local_roots), Durability::HIGH);
|
||||
(db, position, selections)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue