Skip to content

Commit 390d1be

Browse files
committed
update AST-to-HIR lowering examples for conditionals and loops
- `for` loops now use two `match`es for all of their bindings. I'm not sure this is the most helpful way of conveying that, but it's about as informative as before while staying brief. - `while let` and `if let` don't use `match`; they use `let` expressions in their conditions. Since `if let` no longer has significantly different desugaring and having a whole bullet point for `while` would feel redundant with `for`, I've removed those examples.
1 parent 5628341 commit 390d1be

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/doc/rustc-dev-guide/src/hir/lowering.md

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ of such structures include but are not limited to
77

88
* Parenthesis
99
* Removed without replacement, the tree structure makes order explicit
10-
* `for` loops and `while (let)` loops
11-
* Converted to `loop` + `match` and some `let` bindings
12-
* `if let`
13-
* Converted to `match`
10+
* `for` loops
11+
* Converted to `match` + `loop` + `match`
1412
* Universal `impl Trait`
1513
* Converted to generic arguments
1614
(but with some flags, to know that the user didn't write them)

0 commit comments

Comments
 (0)