mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +00:00
internal: Properly check the edition for edition dependent syntax kinds
This commit is contained in:
parent
2b86639018
commit
f90bdfc13d
23 changed files with 348 additions and 130 deletions
|
@ -1,4 +1,5 @@
|
|||
//! Utilities for formatting macro expanded nodes until we get a proper formatter.
|
||||
use span::Edition;
|
||||
use syntax::{
|
||||
ast::make,
|
||||
ted::{self, Position},
|
||||
|
@ -131,5 +132,6 @@ pub fn insert_ws_into(syn: SyntaxNode) -> SyntaxNode {
|
|||
}
|
||||
|
||||
fn is_text(k: SyntaxKind) -> bool {
|
||||
k.is_keyword() || k.is_literal() || k == IDENT || k == UNDERSCORE
|
||||
// FIXME: Edition
|
||||
k.is_keyword(Edition::CURRENT) || k.is_literal() || k == IDENT || k == UNDERSCORE
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue