remove lifetime from syntax node text

This commit is contained in:
Aleksey Kladov 2019-07-19 21:41:36 +03:00
parent 0025299370
commit d92a88bf09
3 changed files with 15 additions and 14 deletions

View file

@ -238,7 +238,7 @@ fn api_walkthrough() {
// You can get node's text as a `SyntaxText` object, which will traverse the
// tree collecting token's text:
let text: SyntaxText<'_> = expr_syntax.text();
let text: SyntaxText = expr_syntax.text();
assert_eq!(text.to_string(), "1 + 1");
// There's a bunch of traversal methods on `SyntaxNode`: