diff options
Diffstat (limited to 'docs/user')
-rw-r--r-- | docs/user/features.md | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/docs/user/features.md b/docs/user/features.md index cbfc491b2..a714574fb 100644 --- a/docs/user/features.md +++ b/docs/user/features.md | |||
@@ -388,6 +388,24 @@ fn foo() { | |||
388 | } | 388 | } |
389 | ``` | 389 | ``` |
390 | 390 | ||
391 | - Move guard expression to match arm body | ||
392 | ```rust | ||
393 | //before: | ||
394 | fn f() { | ||
395 | match x { | ||
396 | <|>y @ 4 | y @ 5 if y > 5 => true, | ||
397 | _ => false | ||
398 | } | ||
399 | } | ||
400 | //after: | ||
401 | fn f() { | ||
402 | match x { | ||
403 | y @ 4 | y @ 5 => if y > 5 { <|>true }, | ||
404 | _ => false | ||
405 | } | ||
406 | } | ||
407 | ``` | ||
408 | |||
391 | ### Magic Completions | 409 | ### Magic Completions |
392 | 410 | ||
393 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ | 411 | In addition to usual reference completion, rust-analyzer provides some ✨magic✨ |