aboutsummaryrefslogtreecommitdiff
path: root/crates/syntax
diff options
context:
space:
mode:
Diffstat (limited to 'crates/syntax')
-rw-r--r--crates/syntax/src/algo.rs2
-rw-r--r--crates/syntax/src/ast/make.rs2
2 files changed, 2 insertions, 2 deletions
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<'_> {
555 555
556fn element_to_green(element: SyntaxElement) -> NodeOrToken<rowan::GreenNode, rowan::GreenToken> { 556fn element_to_green(element: SyntaxElement) -> NodeOrToken<rowan::GreenNode, rowan::GreenToken> {
557 match element { 557 match element {
558 NodeOrToken::Node(it) => NodeOrToken::Node(it.green()), 558 NodeOrToken::Node(it) => NodeOrToken::Node(it.green().into_owned()),
559 NodeOrToken::Token(it) => NodeOrToken::Token(it.green().to_owned()), 559 NodeOrToken::Token(it) => NodeOrToken::Token(it.green().to_owned()),
560 } 560 }
561} 561}
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<N: AstNode>(text: &str) -> N {
572} 572}
573 573
574fn unroot(n: SyntaxNode) -> SyntaxNode { 574fn unroot(n: SyntaxNode) -> SyntaxNode {
575 SyntaxNode::new_root(n.green()) 575 SyntaxNode::new_root(n.green().into())
576} 576}
577 577
578pub mod tokens { 578pub mod tokens {