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

Even more let_else adoptions #94011

Merged
merged 1 commit into from
Feb 18, 2022
Merged

Even more let_else adoptions #94011

merged 1 commit into from
Feb 18, 2022

Conversation

est31
Copy link
Member

@est31 est31 commented Feb 15, 2022

Continuation of #89933, #91018, #91481, #93046, #93590.

@rustbot rustbot added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Feb 15, 2022
@rust-highfive
Copy link
Collaborator

r? @lcnr

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Feb 15, 2022
@est31
Copy link
Member Author

est31 commented Feb 15, 2022

In the wake of #93951 I wanted to increase the amount let else is tested in the compiler, so I wrote a clippy lint to identify even more places that could benefit from using let else. I didn't find any issues with the let else feature, although I found some false positives for my lint, so this exercise was helpful :).

Copy link
Contributor

@lcnr lcnr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 nit, after that r=me

compiler/rustc_codegen_ssa/src/back/link.rs Show resolved Hide resolved
@joshtriplett
Copy link
Member

@bors r=lcnr

@bors
Copy link
Contributor

bors commented Feb 17, 2022

📌 Commit 60f969a has been approved by lcnr

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Feb 17, 2022
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 17, 2022
…askrgr

Rollup of 9 pull requests

Successful merges:

 - rust-lang#93337 (Update tracking issue numbers for inline assembly sub-features)
 - rust-lang#93758 (Improve comments about type folding/visiting.)
 - rust-lang#93780 (Generate list instead of div items in sidebar)
 - rust-lang#93976 (Add MAIN_SEPARATOR_STR)
 - rust-lang#94011 (Even more let_else adoptions)
 - rust-lang#94041 (Add a `try_collect()` helper method to `Iterator`)
 - rust-lang#94043 (Fix ICE when using Box<T, A> with pointer sized A)
 - rust-lang#94082 (Remove CFG_PLATFORM)
 - rust-lang#94085 (Clippy: Don't lint `needless_borrow` in method receiver positions)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 637d8b8 into rust-lang:master Feb 18, 2022
@rustbot rustbot added this to the 1.60.0 milestone Feb 18, 2022
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2022
Adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs rust-lang#94139, rust-lang#94142, rust-lang#94143, rust-lang#94144.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2022
rustc_typeck: adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_typeck.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 19, 2022
Adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This is the biggest of these PRs and handles the changes outside of rustdoc, rustc_typeck, rustc_const_eval, rustc_trait_selection, which were handled in PRs rust-lang#94139, rust-lang#94142, rust-lang#94143, rust-lang#94144.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 21, 2022
rustc_const_eval: adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_const_eval.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Feb 26, 2022
…jgillot

rustc_trait_selection: adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_trait_selection.
bors added a commit to rust-lang-ci/rust that referenced this pull request Feb 27, 2022
…illot

rustc_trait_selection: adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles rustc_trait_selection.
bors added a commit to rust-lang-ci/rust that referenced this pull request Mar 14, 2022
librustdoc: adopt let else in more places

Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590, rust-lang#94011.

I have extended my clippy lint to also recognize tuple passing and match statements. The diff caused by fixing it is way above 1 thousand lines. Thus, I split it up into multiple pull requests to make reviewing easier. This PR handles librustdoc.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants