aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/dev/lsp-extensions.md2
-rw-r--r--docs/user/assists.md24
2 files changed, 25 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md
index 68a5df27e..dbc95be38 100644
--- a/docs/dev/lsp-extensions.md
+++ b/docs/dev/lsp-extensions.md
@@ -154,7 +154,7 @@ fn main() {
154} 154}
155``` 155```
156 156
157`experimental/joinLines` yields (curly braces are automagiacally removed) 157`experimental/joinLines` yields (curly braces are automagically removed)
158 158
159```rust 159```rust
160fn main() { 160fn main() {
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 4ad7ea59d..a1058ecde 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -259,6 +259,30 @@ fn main() {
259} 259}
260``` 260```
261 261
262## `change_lifetime_anon_to_named`
263
264Change an anonymous lifetime to a named lifetime.
265
266```rust
267// BEFORE
268impl Cursor<'_┃> {
269 fn node(self) -> &SyntaxNode {
270 match self {
271 Cursor::Replace(node) | Cursor::Before(node) => node,
272 }
273 }
274}
275
276// AFTER
277impl<'a> Cursor<'a> {
278 fn node(self) -> &SyntaxNode {
279 match self {
280 Cursor::Replace(node) | Cursor::Before(node) => node,
281 }
282 }
283}
284```
285
262## `change_return_type_to_result` 286## `change_return_type_to_result`
263 287
264Change the function's return type to Result. 288Change the function's return type to Result.