aboutsummaryrefslogtreecommitdiff
path: root/docs/user
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user')
-rw-r--r--docs/user/assists.md24
1 files changed, 24 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index b5d813b54..04387e3b0 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -277,6 +277,30 @@ fn main() {
277} 277}
278``` 278```
279 279
280## `change_lifetime_anon_to_named`
281
282Change an anonymous lifetime to a named lifetime.
283
284```rust
285// BEFORE
286impl Cursor<'_┃> {
287 fn node(self) -> &SyntaxNode {
288 match self {
289 Cursor::Replace(node) | Cursor::Before(node) => node,
290 }
291 }
292}
293
294// AFTER
295impl<'a> Cursor<'a> {
296 fn node(self) -> &SyntaxNode {
297 match self {
298 Cursor::Replace(node) | Cursor::Before(node) => node,
299 }
300 }
301}
302```
303
280## `change_return_type_to_result` 304## `change_return_type_to_result`
281 305
282Change the function's return type to Result. 306Change the function's return type to Result.