aboutsummaryrefslogtreecommitdiff
path: root/docs/user/assists.md
diff options
context:
space:
mode:
Diffstat (limited to 'docs/user/assists.md')
-rw-r--r--docs/user/assists.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/docs/user/assists.md b/docs/user/assists.md
index 754131f6f..75404e289 100644
--- a/docs/user/assists.md
+++ b/docs/user/assists.md
@@ -582,6 +582,21 @@ impl Walrus {
582} 582}
583``` 583```
584 584
585## `reorder_fields`
586
587Reorder the fields of record literals and record patterns in the same order as in
588the definition.
589
590```rust
591// BEFORE
592struct Foo {foo: i32, bar: i32};
593const test: Foo = ┃Foo {bar: 0, foo: 1}
594
595// AFTER
596struct Foo {foo: i32, bar: i32};
597const test: Foo = Foo {foo: 1, bar: 0}
598```
599
585## `replace_if_let_with_match` 600## `replace_if_let_with_match`
586 601
587Replaces `if let` with an else branch with a `match` expression. 602Replaces `if let` with an else branch with a `match` expression.