Skip to content

Conversation

@estebank
Copy link
Contributor

No description provided.

@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2025

Some changes occurred in compiler/rustc_codegen_cranelift

cc @bjorn3

Some changes occurred in compiler/rustc_codegen_ssa

cc @WaffleLapkin

HIR ty lowering was modified

cc @fmease

Some changes occurred in compiler/rustc_codegen_gcc

cc @antoyo, @GuillaumeGomez

Some changes occurred to MIR optimizations

cc @rust-lang/wg-mir-opt

@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-windows Operating system: Windows S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Nov 11, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 11, 2025

r? @wesleywiser

rustbot has assigned @wesleywiser.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot

This comment has been minimized.

Copy link
Member

Choose a reason for hiding this comment

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

Maybe skip this for now to avoid conflicts with #148481?

@Kivooeo Kivooeo assigned Kivooeo and unassigned wesleywiser Nov 11, 2025
@chenyukang
Copy link
Member

do we have a style check for this?

@estebank
Copy link
Contributor Author

@chenyukang there's a pedantic clippy lint that we could enable: https://rust-lang.github.io/rust-clippy/master/index.html#/let-else

Copy link
Member

@Kivooeo Kivooeo left a comment

Choose a reason for hiding this comment

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

Thanks for taking time on this, looks good on compiler side, would this reasonable to split compiler and library parts? I'm not sure if I privileged enough to review the library part

There is some places that looks better with the if let guard feature to remove nesting

View changes since this review

@bors

This comment was marked as outdated.

@rustbot

This comment has been minimized.

@estebank estebank force-pushed the let-else branch 2 times, most recently from f61284d to 9c1998b Compare December 9, 2025 00:43
@rustbot
Copy link
Collaborator

rustbot commented Dec 9, 2025

Some changes occurred to the CTFE machinery

cc @RalfJung, @oli-obk, @lcnr

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

// tidy-alphabetical-start
#![cfg_attr(bootstrap, feature(array_windows))]
#![deny(clippy::manual_let_else)]
Copy link
Member

@Kivooeo Kivooeo Dec 9, 2025

Choose a reason for hiding this comment

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

let's not add this lint anywhere yet, I think CI will never stop complain about it :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm finding them instructive :)

Copy link
Member

Choose a reason for hiding this comment

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

ah, so feel free to «r=me» once CI passed

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 10, 2025
…bilee

Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off rust-lang#148837.
Zalathar added a commit to Zalathar/rust that referenced this pull request Dec 10, 2025
…bilee

Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off rust-lang#148837.
matthiaskrgr added a commit to matthiaskrgr/rust that referenced this pull request Dec 10, 2025
…bilee

Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off rust-lang#148837.
rust-timer added a commit that referenced this pull request Dec 10, 2025
Rollup merge of #149795 - estebank:let-else-std, r=workingjubilee

Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off #148837.
github-actions bot pushed a commit to rust-lang/miri that referenced this pull request Dec 11, 2025
Use `let`...`else` instead of `match foo { ... _ => return };` and `if let ... else return` in std

Split off rust-lang/rust#148837.
@rustbot

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Collaborator

bors commented Dec 12, 2025

☔ The latest upstream changes (presumably #149645) made this pull request unmergeable. Please resolve the merge conflicts.

@rustbot
Copy link
Collaborator

rustbot commented Dec 12, 2025

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

@estebank
Copy link
Contributor Author

@bors r=Kivooeo

@bors
Copy link
Collaborator

bors commented Dec 12, 2025

📌 Commit 97c7742 has been approved by Kivooeo

It is now in the queue for this repository.

@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 Dec 12, 2025
jhpratt added a commit to jhpratt/rust that referenced this pull request Dec 13, 2025
Use `let...else` instead of `match foo { ... _ => return };` and `if let ... else return`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. O-windows Operating system: Windows 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-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants