mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 21:05:02 +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
|
@ -1054,6 +1054,7 @@ impl<N: AstNode + Clone> Indent for N {}
|
|||
mod tests {
|
||||
use std::fmt;
|
||||
|
||||
use parser::Edition;
|
||||
use stdx::trim_indent;
|
||||
use test_utils::assert_eq_text;
|
||||
|
||||
|
@ -1062,7 +1063,7 @@ mod tests {
|
|||
use super::*;
|
||||
|
||||
fn ast_mut_from_text<N: AstNode>(text: &str) -> N {
|
||||
let parse = SourceFile::parse(text);
|
||||
let parse = SourceFile::parse(text, Edition::CURRENT);
|
||||
parse.tree().syntax().descendants().find_map(N::cast).unwrap().clone_for_update()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue