mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-26 11:59:49 +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
|
@ -255,7 +255,7 @@ pub fn diff(from: &SyntaxNode, to: &SyntaxNode) -> TreeDiff {
|
|||
mod tests {
|
||||
use expect_test::{expect, Expect};
|
||||
use itertools::Itertools;
|
||||
use parser::SyntaxKind;
|
||||
use parser::{Edition, SyntaxKind};
|
||||
use text_edit::TextEdit;
|
||||
|
||||
use crate::{AstNode, SyntaxElement};
|
||||
|
@ -607,8 +607,8 @@ fn main() {
|
|||
}
|
||||
|
||||
fn check_diff(from: &str, to: &str, expected_diff: Expect) {
|
||||
let from_node = crate::SourceFile::parse(from).tree().syntax().clone();
|
||||
let to_node = crate::SourceFile::parse(to).tree().syntax().clone();
|
||||
let from_node = crate::SourceFile::parse(from, Edition::CURRENT).tree().syntax().clone();
|
||||
let to_node = crate::SourceFile::parse(to, Edition::CURRENT).tree().syntax().clone();
|
||||
let diff = super::diff(&from_node, &to_node);
|
||||
|
||||
let line_number =
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue