mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-28 04:44:57 +00:00
remove lifetime from syntax node text
This commit is contained in:
parent
0025299370
commit
d92a88bf09
3 changed files with 15 additions and 14 deletions
|
@ -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`:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue