mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-22 16:22:27 +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
|
|
@ -16,11 +16,11 @@ use intern::Symbol;
|
|||
use la_arena::{Arena, Idx, RawIdx};
|
||||
use rustc_hash::{FxHashMap, FxHashSet, FxHasher};
|
||||
use salsa::{Durability, Setter};
|
||||
use span::{Edition, EditionedFileId};
|
||||
use span::Edition;
|
||||
use triomphe::Arc;
|
||||
use vfs::{AbsPathBuf, AnchoredPath, FileId, VfsPath, file_set::FileSet};
|
||||
|
||||
use crate::{CrateWorkspaceData, RootQueryDb};
|
||||
use crate::{CrateWorkspaceData, EditionedFileId, RootQueryDb};
|
||||
|
||||
pub type ProcMacroPaths = FxHashMap<CrateBuilderId, Result<(String, AbsPathBuf), String>>;
|
||||
|
||||
|
|
@ -773,8 +773,8 @@ pub(crate) fn transitive_rev_deps(db: &dyn RootQueryDb, of: Crate) -> FxHashSet<
|
|||
}
|
||||
|
||||
impl BuiltCrateData {
|
||||
pub fn root_file_id(&self) -> EditionedFileId {
|
||||
EditionedFileId::new(self.root_file_id, self.edition)
|
||||
pub fn root_file_id(&self, db: &dyn salsa::Database) -> EditionedFileId {
|
||||
EditionedFileId::new(db, self.root_file_id, self.edition)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue