From dc4fa504ea2723bd5083284cabf81b4c5806ed4b Mon Sep 17 00:00:00 2001 From: Dawer <7803845+iDawer@users.noreply.github.com> Date: Thu, 6 May 2021 10:06:52 +0500 Subject: Adapt to a new rowan borrowing node API. --- crates/syntax/src/algo.rs | 2 +- crates/syntax/src/ast/make.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/syntax') diff --git a/crates/syntax/src/algo.rs b/crates/syntax/src/algo.rs index c9229c4e0..ba263be0d 100644 --- a/crates/syntax/src/algo.rs +++ b/crates/syntax/src/algo.rs @@ -555,7 +555,7 @@ impl SyntaxRewriter<'_> { fn element_to_green(element: SyntaxElement) -> NodeOrToken { match element { - NodeOrToken::Node(it) => NodeOrToken::Node(it.green()), + NodeOrToken::Node(it) => NodeOrToken::Node(it.green().into_owned()), NodeOrToken::Token(it) => NodeOrToken::Token(it.green().to_owned()), } } diff --git a/crates/syntax/src/ast/make.rs b/crates/syntax/src/ast/make.rs index 42da09606..4bcea28cc 100644 --- a/crates/syntax/src/ast/make.rs +++ b/crates/syntax/src/ast/make.rs @@ -572,7 +572,7 @@ fn ast_from_text(text: &str) -> N { } fn unroot(n: SyntaxNode) -> SyntaxNode { - SyntaxNode::new_root(n.green()) + SyntaxNode::new_root(n.green().into()) } pub mod tokens { -- cgit v1.2.3