-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
base: master
Are you sure you want to change the base?
Use let chains in the new solver #143066
Conversation
compiler/rustc_next_trait_solver/src/solve/normalizes_to/mod.rs
Outdated
Show resolved
Hide resolved
5833e55
to
ed388de
Compare
…, 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!
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()); | ||
} |
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.
vibe, no longer early return, just use 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.
r=me with or without converting the relevant functions to if <let-chain> { value } else { value }
instead of an explicit early return
Self-explanatory
Let chains are stable as of today
r? lcnr