Skip to content

Use let chains in the new solver #143066

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

compiler-errors
Copy link
Member

Self-explanatory

Let chains are stable as of today

r? lcnr

@rustbot rustbot added 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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Jun 26, 2025
compiler-errors added a commit to compiler-errors/rust that referenced this pull request Jun 27, 2025
…, r=compiler-errors

Fix some fixmes that were waiting for let chains

Was inspired by looking at rust-lang#143066 and spotting two fixmes that were missed, so... r? `@compiler-errors`  😅

Yay, let chains!
rust-timer added a commit that referenced this pull request Jun 27, 2025
Rollup merge of #143073 - yotamofek:pr/fix-let-chains-fixmes, r=compiler-errors

Fix some fixmes that were waiting for let chains

Was inspired by looking at #143066 and spotting two fixmes that were missed, so... r? `@compiler-errors`  😅

Yay, let chains!
if let ty::Alias(ty::Projection, alias_ty) = ty.kind()
&& let Some(term) = self.try_eagerly_replace_alias(alias_ty.into())?
{
return Ok(term.expect_ty());
}
Copy link
Contributor

@lcnr lcnr Jun 27, 2025

Choose a reason for hiding this comment

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

vibe, no longer early return, just use else?

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.

r=me with or without converting the relevant functions to if <let-chain> { value } else { value } instead of an explicit early return

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)
3 participants