mirror of
https://github.com/rust-lang/rust-analyzer
synced 2024-12-27 05:23:24 +00:00
Adapt to a new rowan borrowing node API.
This commit is contained in:
parent
52143f389f
commit
dc4fa504ea
2 changed files with 2 additions and 2 deletions
|
@ -555,7 +555,7 @@ impl SyntaxRewriter<'_> {
|
|||
|
||||
fn element_to_green(element: SyntaxElement) -> NodeOrToken<rowan::GreenNode, rowan::GreenToken> {
|
||||
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()),
|
||||
}
|
||||
}
|
||||
|
|
|
@ -572,7 +572,7 @@ fn ast_from_text<N: AstNode>(text: &str) -> N {
|
|||
}
|
||||
|
||||
fn unroot(n: SyntaxNode) -> SyntaxNode {
|
||||
SyntaxNode::new_root(n.green())
|
||||
SyntaxNode::new_root(n.green().into())
|
||||
}
|
||||
|
||||
pub mod tokens {
|
||||
|
|
Loading…
Reference in a new issue