-
Notifications
You must be signed in to change notification settings - Fork 13k
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: enum variant discr was too generic to eval
#135208
Comments
bisects to #133610 |
Another variation: #[repr(simd)]
enum Foo {
A,
}
enum Bar {
Boo = { Foo::A; 1 },
} @rustbot label +regression-from-stable-to-nightly |
|
This is only reached by misusing internal APIs. |
EDIT: if this was only ICEing on |
I agree, maybe we can do better error-tainting and not run into an ICE later on.. |
This comment has been minimized.
This comment has been minimized.
This is also reachable without union Foo {
a: str,
}
enum Bar {
Boo = { let _: Option<Foo> = None; 0 },
} |
oh, a reduction that removes the usage of the internal API! brilliant. |
@matthiaskrgr when reducing issues, please remove such internal unnecessary features when needed. treereduce is a great tool, but it is not a complete substitute for human guided reductions. |
of course not! Please note that on the original code, the ICE is no longer reproducible if you just remove the attribute, so it would have never been found without it. |
I think point "internal api" is also easily dismissed because we never opted into said feature by declaring
which should be the bare minimum to tell the user that they may be going off the rails. |
@matthiaskrgr If you're so concerned about the feature gate handling in rustc then I await your PR. |
re-triaging as P-low since it still has good error messages and it is a regression |
…rrors warn about broken simd not only on structs but also enums and unions when we didn't opt in to it addresses rust-lang#135208 (comment) r? `@Noratrieb`
…rrors warn about broken simd not only on structs but also enums and unions when we didn't opt in to it addresses rust-lang#135208 (comment) r? ``@Noratrieb``
Rollup merge of rust-lang#135219 - matthiaskrgr:simd'nt, r=compiler-errors warn about broken simd not only on structs but also enums and unions when we didn't opt in to it addresses rust-lang#135208 (comment) r? ``@Noratrieb``
auto-reduced (treereduce-rust):
Version information
Possibly related line of code:
rust/compiler/rustc_hir_analysis/src/check/wfcheck.rs
Lines 1190 to 1202 in fb546ee
Command:
/home/matthias/.rustup/toolchains/master/bin/rustc
Program output
The text was updated successfully, but these errors were encountered: