mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
internal: Thread edition through to parsing/tt-to-syntax-tree routines for macros
This commit is contained in:
parent
83370fe5d7
commit
a483d3bc37
39 changed files with 187 additions and 145 deletions
|
@ -17,7 +17,7 @@ use ide_db::{
|
|||
};
|
||||
use syntax::{
|
||||
ast::{self, AttrKind, NameOrNameRef},
|
||||
AstNode, SmolStr,
|
||||
AstNode, Edition, SmolStr,
|
||||
SyntaxKind::{self, *},
|
||||
SyntaxToken, TextRange, TextSize, T,
|
||||
};
|
||||
|
@ -667,7 +667,8 @@ impl<'a> CompletionContext<'a> {
|
|||
let file_with_fake_ident = {
|
||||
let parse = db.parse(file_id);
|
||||
let edit = Indel::insert(offset, COMPLETION_MARKER.to_owned());
|
||||
parse.reparse(&edit).tree()
|
||||
// FIXME: Edition
|
||||
parse.reparse(&edit, Edition::CURRENT).tree()
|
||||
};
|
||||
|
||||
// always pick the token to the immediate left of the cursor, as that is what we are actually
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue