-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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: trying to compare incompatible ctors while building rustfmt #78549
Comments
Might be related to #78072 or #78430, cc @Nadrieril |
Ouch, this is indeed my fault. Reproducer: fn main() {
match "foo" {
"foo" => {},
&_ => {},
}
} |
Easy fix: replace |
searched nightlies: from nightly-2020-10-28 to nightly-2020-10-30 bisected with cargo-bisect-rustc v0.6.0Host triple: x86_64-apple-darwin cargo bisect-rustc --preserve --regress=ice --start=2020-10-28 It was #78430. |
rust-lang/rust#78549 is currently blocking build with latest nightly. Even though this issue is getting fixed, the above fix circumvents it and should make builds work again.
I'm seeing a similar error when building
|
Assigning |
@JohnTitor The PR that fixes this is ready to be merged #78553 |
Fix rust-lang#78549 Before rust-lang#78430, this worked because `specialize_constructor` didn't actually care too much which constructor was passed to it unless needed. That PR however handles `&str` as a special case, and I did not anticipate patterns for the `&str` type other than string literals. I am not very confident there are not other similar oversights left, but hopefully only `&str` was different enough to break my assumptions. Fixes rust-lang#78549
Repro
Meta
rustc --version --verbose
:rustc is @ 6bdae9e
Error output
Backtrace
The text was updated successfully, but these errors were encountered: