Skip to content

Conversation

@dianne
Copy link
Contributor

@dianne dianne commented Jun 30, 2025

  • for loops now use two matches 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. I'd be happy to make this clearer, if anyone has ideas.
  • while let and if let don't use match; they use let expressions in their conditions. Since if let no longer has a significantly different desugaring and having a whole bullet point for while would feel redundant with for, I've removed those examples.

- `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.
@rustbot
Copy link
Collaborator

rustbot commented Jun 30, 2025

Thanks for the PR. If you have write access, feel free to merge this PR if it does not need reviews. You can request a review using r? rustc-dev-guide or r? <username>.

@rustbot rustbot added the S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content label Jun 30, 2025
@dianne
Copy link
Contributor Author

dianne commented Jun 30, 2025

r? rustc-dev-guide

@Noratrieb Noratrieb merged commit 40a2556 into rust-lang:master Jun 30, 2025
1 check passed
@dianne dianne deleted the update-cond-loop-desugaring branch July 6, 2025 00:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review Status: this PR is waiting for a reviewer to verify its content

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants