mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +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
|
@ -12,7 +12,7 @@ use cfg::CfgOptions;
|
|||
use intern::Symbol;
|
||||
use la_arena::{Arena, Idx, RawIdx};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
use span::Edition;
|
||||
use span::{Edition, EditionedFileId};
|
||||
use triomphe::Arc;
|
||||
use vfs::{file_set::FileSet, AbsPathBuf, AnchoredPath, FileId, VfsPath};
|
||||
|
||||
|
@ -662,6 +662,10 @@ impl CrateData {
|
|||
fn add_dep(&mut self, dep: Dependency) {
|
||||
self.dependencies.push(dep)
|
||||
}
|
||||
|
||||
pub fn root_file_id(&self) -> EditionedFileId {
|
||||
EditionedFileId::new(self.root_file_id, self.edition)
|
||||
}
|
||||
}
|
||||
|
||||
impl Extend<(String, String)> for Env {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue