mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 04:19:13 +00:00
Use Edition::CURRENT
This commit is contained in:
parent
9c75e9fa7d
commit
83370fe5d7
16 changed files with 17 additions and 19 deletions
|
@ -172,7 +172,7 @@ pub use crate::ast::SourceFile;
|
|||
impl SourceFile {
|
||||
pub fn parse(text: &str) -> Parse<SourceFile> {
|
||||
let _p = tracing::span!(tracing::Level::INFO, "SourceFile::parse").entered();
|
||||
let (green, errors) = parsing::parse_text(text, parser::Edition::Edition2021);
|
||||
let (green, errors) = parsing::parse_text(text, parser::Edition::CURRENT);
|
||||
let root = SyntaxNode::new_root(green.clone());
|
||||
|
||||
assert_eq!(root.kind(), SyntaxKind::SOURCE_FILE);
|
||||
|
|
|
@ -27,7 +27,7 @@ pub(crate) fn incremental_reparse(
|
|||
}
|
||||
|
||||
if let Some((green, new_errors, old_range)) =
|
||||
reparse_block(node, edit, parser::Edition::Edition2021)
|
||||
reparse_block(node, edit, parser::Edition::CURRENT)
|
||||
{
|
||||
return Some((green, merge_errors(errors, new_errors, old_range, edit), old_range));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue