aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorUnreal Hoang <[email protected]>2019-05-01 16:57:16 +0100
committerUnreal Hoang <[email protected]>2019-05-01 17:41:02 +0100
commitd1c21b85cf7c8ca55bf0f83f2359d9018e321705 (patch)
tree1b0dcbd9424ff205c0a472ecb1788d14c6c62836 /docs
parentf83e452b1e69e8a6cc0d36715651418e3ce50afb (diff)
add complex match case and documentation
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✨