aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorbors[bot] <bors[bot]@users.noreply.github.com>2019-05-01 18:28:07 +0100
committerbors[bot] <bors[bot]@users.noreply.github.com>2019-05-01 18:28:07 +0100
commit817a38538f69d5383942476a6066ca98d6f7d1cb (patch)
treea0ede4dddc09d68e47ab68512798cfcafafc7b13 /docs
parent71c13528cdcad9930ded24054daf6bb1678835e7 (diff)
parentd1c21b85cf7c8ca55bf0f83f2359d9018e321705 (diff)
Merge #1223
1223: Move guard to arm body assist r=matklad a=unrealhoang This is my attempt at #1206 Co-authored-by: Unreal Hoang <[email protected]>
Diffstat (limited to 'docs')
-rw-r--r--docs/user/features.md18
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:
394fn f() {
395 match x {
396 <|>y @ 4 | y @ 5 if y > 5 => true,
397 _ => false
398 }
399}
400//after:
401fn 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
393In addition to usual reference completion, rust-analyzer provides some ✨magic✨ 411In addition to usual reference completion, rust-analyzer provides some ✨magic✨