Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace if-let and while-let with if let and while let #82205

Closed
camelid opened this issue Feb 17, 2021 · 2 comments · Fixed by #82215
Closed

Replace if-let and while-let with if let and while let #82205

camelid opened this issue Feb 17, 2021 · 2 comments · Fixed by #82215
Assignees
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.

Comments

@camelid
Copy link
Member

camelid commented Feb 17, 2021

I kind of like the look of if-let and while-let, but @varkor and I think that
it's probably clearer and more consistent with other error messages as `if let` and `while let`.

This will have to be changed in the compiler's error messages and the language
documentation (in src/doc/). Run rg -F -e '-let' compiler/ src/doc to find
out what to change.

Originally discussed in #79747 (comment).

@camelid camelid added A-diagnostics Area: Messages for errors, warnings, and lints C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools T-lang Relevant to the language team, which will review and decide on the PR/issue. labels Feb 17, 2021
@jyn514 jyn514 added the E-help-wanted Call for participation: Help is requested to fix this issue. label Feb 17, 2021
@osa1
Copy link
Contributor

osa1 commented Feb 17, 2021

@rustbot label: +E-easy

@rustbot rustbot added the E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. label Feb 17, 2021
@TaKO8Ki
Copy link
Member

TaKO8Ki commented Feb 17, 2021

I'm interested in working on this issue.
@rustbot claim

Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Feb 18, 2021
…=varkor

Replace if-let and while-let with `if let` and `while let`

This pull request replaces if-let and while-let with `if let` and `while let`.

closes rust-lang#82205
@bors bors closed this as completed in b3d3251 Feb 18, 2021
flip1995 pushed a commit to flip1995/rust-clippy that referenced this issue Feb 25, 2021
Replace if-let and while-let with `if let` and `while let`

This pull request replaces if-let and while-let with `if let` and `while let`.

closes rust-lang/rust#82205
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-docs Area: Documentation for any part of the project, including the compiler, standard library, and tools C-cleanup Category: PRs that clean code up or issues documenting cleanup. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. E-help-wanted Call for participation: Help is requested to fix this issue. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-lang Relevant to the language team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants