Upgrade rowan

Notably, new rowan comes with support for mutable syntax trees.
This commit is contained in:
Aleksey Kladov 2021-01-30 18:19:21 +03:00
parent 62ec04bbd5
commit f5a81ec468
41 changed files with 376 additions and 176 deletions

View file

@ -34,7 +34,9 @@ impl ast::NameRef {
}
fn text_of_first_token(node: &SyntaxNode) -> &str {
node.green().children().next().and_then(|it| it.into_token()).unwrap().text()
let t =
node.green().children().next().and_then(|it| it.into_token()).unwrap().text().to_string();
Box::leak(Box::new(t))
}
pub enum Macro {