mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-10-26 09:49:15 +00:00
Make edition per-token, not per-file
More correctly, *also* per-token. Because as it turns out, while the top-level edition affects parsing (I think), the per-token edition affects escaping of identifiers/keywords.
This commit is contained in:
parent
3f2bbe9fed
commit
97afb7bfba
34 changed files with 480 additions and 316 deletions
|
|
@ -76,7 +76,7 @@ fn assert_expand_impl(
|
|||
file_id: EditionedFileId::current_edition(FileId::from_raw(41)),
|
||||
ast_id: ErasedFileAstId::from_raw(1),
|
||||
},
|
||||
ctx: SyntaxContextId::ROOT,
|
||||
ctx: SyntaxContextId::root(span::Edition::CURRENT),
|
||||
};
|
||||
let call_site = Span {
|
||||
range: TextRange::new(0.into(), 100.into()),
|
||||
|
|
@ -84,7 +84,7 @@ fn assert_expand_impl(
|
|||
file_id: EditionedFileId::current_edition(FileId::from_raw(42)),
|
||||
ast_id: ErasedFileAstId::from_raw(2),
|
||||
},
|
||||
ctx: SyntaxContextId::ROOT,
|
||||
ctx: SyntaxContextId::root(span::Edition::CURRENT),
|
||||
};
|
||||
let mixed_site = call_site;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue