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
|
@ -2,7 +2,7 @@
|
|||
|
||||
use expect_test::Expect;
|
||||
use proc_macro_api::msg::TokenId;
|
||||
use span::{ErasedFileAstId, FileId, Span, SpanAnchor, SyntaxContextId};
|
||||
use span::{EditionedFileId, ErasedFileAstId, FileId, Span, SpanAnchor, SyntaxContextId};
|
||||
use tt::TextRange;
|
||||
|
||||
use crate::{dylib, proc_macro_test_dylib_path, EnvSnapshot, ProcMacroSrv};
|
||||
|
@ -68,7 +68,7 @@ fn assert_expand_impl(
|
|||
let def_site = Span {
|
||||
range: TextRange::new(0.into(), 150.into()),
|
||||
anchor: SpanAnchor {
|
||||
file_id: FileId::from_raw(41),
|
||||
file_id: EditionedFileId::current_edition(FileId::from_raw(41)),
|
||||
ast_id: ErasedFileAstId::from_raw(From::from(1)),
|
||||
},
|
||||
ctx: SyntaxContextId::ROOT,
|
||||
|
@ -76,7 +76,7 @@ fn assert_expand_impl(
|
|||
let call_site = Span {
|
||||
range: TextRange::new(0.into(), 100.into()),
|
||||
anchor: SpanAnchor {
|
||||
file_id: FileId::from_raw(42),
|
||||
file_id: EditionedFileId::current_edition(FileId::from_raw(42)),
|
||||
ast_id: ErasedFileAstId::from_raw(From::from(2)),
|
||||
},
|
||||
ctx: SyntaxContextId::ROOT,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue