From 9cbf09ec4f24aa30af1d9855a909a6cfc67188f7 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Thu, 18 Mar 2021 12:57:55 +0300 Subject: rewrite merge use trees assist to use muatable syntax trees changelog internal --- crates/syntax/src/ast/make.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/syntax/src/ast/make.rs') diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 7049affd9..c08f2c14f 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -560,7 +560,7 @@ pub mod tokens { pub fn whitespace(text: &str) -> SyntaxToken { assert!(text.trim().is_empty()); let sf = SourceFile::parse(text).ok().unwrap(); - sf.syntax().first_child_or_token().unwrap().into_token().unwrap() + sf.syntax().clone_for_update().first_child_or_token().unwrap().into_token().unwrap() } pub fn doc_comment(text: &str) -> SyntaxToken { -- cgit v1.2.3