mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Encode edition within FileId in the hir layer
This commit is contained in:
parent
92268627a8
commit
5264f86242
160 changed files with 1117 additions and 824 deletions
|
@ -48,10 +48,13 @@ use std::{fmt, mem::ManuallyDrop};
|
|||
|
||||
use base_db::{
|
||||
salsa::{self, Durability},
|
||||
AnchoredPath, CrateId, FileId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast,
|
||||
AnchoredPath, CrateId, FileLoader, FileLoaderDelegate, SourceDatabase, Upcast,
|
||||
DEFAULT_FILE_TEXT_LRU_CAP,
|
||||
};
|
||||
use hir::db::{DefDatabase, ExpandDatabase, HirDatabase};
|
||||
use hir::{
|
||||
db::{DefDatabase, ExpandDatabase, HirDatabase},
|
||||
FilePositionWrapper, FileRangeWrapper,
|
||||
};
|
||||
use triomphe::Arc;
|
||||
|
||||
use crate::{line_index::LineIndex, symbol_index::SymbolsDatabase};
|
||||
|
@ -61,11 +64,15 @@ pub use ::line_index;
|
|||
|
||||
/// `base_db` is normally also needed in places where `ide_db` is used, so this re-export is for convenience.
|
||||
pub use base_db;
|
||||
pub use span::{EditionedFileId, FileId};
|
||||
|
||||
pub type FxIndexSet<T> = indexmap::IndexSet<T, std::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
|
||||
pub type FxIndexMap<K, V> =
|
||||
indexmap::IndexMap<K, V, std::hash::BuildHasherDefault<rustc_hash::FxHasher>>;
|
||||
|
||||
pub type FilePosition = FilePositionWrapper<FileId>;
|
||||
pub type FileRange = FileRangeWrapper<FileId>;
|
||||
|
||||
#[salsa::database(
|
||||
base_db::SourceDatabaseExtStorage,
|
||||
base_db::SourceDatabaseStorage,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue