-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE when match arms have incompatible types #67273
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
Comments
@rustbot modify labels: I-ICE C-Bug T-compiler A-mir Regression from 1.34 to 1.35 |
Additionally, this one ICEs with different error message: fn main() {
let mut i: i64;
match i {
1 => true,
2 => true,
3 => i = 1,
_ => (),
}
} Backtrace
|
This code should not get all the way to codegen without an error |
Another, different ICE? Backtrace
|
Regression somewhere between 33ef0ba...237bf32 |
#59439 looks suspicious, cc @Centril In particular, maybe pub fn is_assign_to_bool(&self, expr: &hir::Expr, expected: Ty<'tcx>) -> bool {
if let hir::ExprKind::Assign(..) = expr.node {
return expected == self.tcx.types.bool;
}
false
} |
|
Code:
Playground
Backtrace
The text was updated successfully, but these errors were encountered: