-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
ICE involving match and never type with never type as fallback enabled #120600
Comments
Regression in nightly-2023-05-23 cc @Nadrieril |
Minimized: #![feature(never_type, never_type_fallback)]
enum E { Bar(!) }
fn f(a: &E, b: &E) {
match (a, b) {
(E::Bar(a), E::Bar(b)) => { *a == *b; }
_ => {}
}
} |
Minimized even more: #![feature(never_type)]
#![feature(never_type_fallback)]
fn ice(a: !) {
a == a;
}
fn main() {} (I independently found the same bug while running crater with the fallback being |
…, r=compiler-errors Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at rust-lang#123482's crater run. r? compiler-errors Fixes rust-lang#120600
…, r=compiler-errors Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at rust-lang#123482's crater run. r? compiler-errors Fixes rust-lang#120600
…, r=compiler-errors Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at rust-lang#123482's crater run. r? compiler-errors Fixes rust-lang#120600
…, r=compiler-errors Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at rust-lang#123482's crater run. r? compiler-errors Fixes rust-lang#120600
Rollup merge of rust-lang#123571 - WaffleLapkin:properly-adjust-never, r=compiler-errors Correctly change type when adding adjustments on top of `NeverToAny` I'm concerned that the check only caught the problem with `fallback = !`, because at least MIR contained `<() as PartialEq>::eq(move _5, move _7)` where `_5: ()`. I rediscovered the issue when looking at rust-lang#123482's crater run. r? compiler-errors Fixes rust-lang#120600
snippet:
Version information
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: