-
Notifications
You must be signed in to change notification settings - Fork 13.4k
More let_else adoptions #93590
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
More let_else adoptions #93590
Conversation
r? @lcnr (rust-highfive has picked a reviewer for you, use r? to override) |
@bors r+ rollup after seeing |
📌 Commit 670f5c6 has been approved by |
@@ -217,85 +217,81 @@ where | |||
let mut issue_num = None; | |||
let mut is_soft = false; | |||
for meta in metas { | |||
if let Some(mi) = meta.meta_item() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This code is being refactored in #93017. Does c271373db4a58920c2a9629cebaab321b3e2ca57 need to use more let-else?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It still has a diverging block in the else case, so your refactored code can still benefit from let else
adoption. But I can remove it here so that it doesn't cause conflicts. Does that sound like a plan to you?
…askrgr Rollup of 8 pull requests Successful merges: - rust-lang#92528 (Make `Fingerprint::combine_commutative` associative) - rust-lang#93221 ([borrowck] Fix help on mutating &self in async fns) - rust-lang#93542 (Prevent lifetime elision in type alias) - rust-lang#93546 (Validate that values in switch int terminator are unique) - rust-lang#93571 (better suggestion for duplicated `where` clause) - rust-lang#93574 (don't suggest adding `let` due to bad assignment expressions inside of `while` loop) - rust-lang#93590 (More let_else adoptions) - rust-lang#93592 (Remove unused dep from rustc_arena) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Even more let_else adoptions Continuation of rust-lang#89933, rust-lang#91018, rust-lang#91481, rust-lang#93046, rust-lang#93590.
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.
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.
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.
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.
…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.
…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.
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.
Continuation of #89933, #91018, #91481, #93046.