-
Notifications
You must be signed in to change notification settings - Fork 13.3k
ICE: "Tried to access field 0 of union with 0 fields" #65462
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
Can you please provide a minimized example that would fit in the playground without any dependencies? We would also appreciate a backtrace. |
Sorry for forgetting the backtrace, here we go:
Regarding a minimized example, I would really like to provide you one, but I did not change any code. I just updated the nightly compiler. The latest stable compiles this code without any problems. |
Sure; it's just substantially more difficult to fix a bug when the input is large as compared to just a few lines of code you can put in a file (and in the playground!). :) Reports with a minimal snippet tend to get fixed much faster and we sorta need a regression test as well. |
Did you try the beta compiler? Does it work there? |
Okay, I tried to find the problem and to reproduce it. I failed at reproducing :( However, I found the line https://github.com/paritytech/polkadot/blob/master/service/src/lib.rs#L167 This I somehow suspect that the where clause could be the reason for it. Sorry for not being able to reduce it anymore! I'm currently testing the beta channel and will report back when I know more. |
Beta works for me. |
I downgraded to "rustc 1.40.0-nightly (c27f756 2019-10-13)" and that compiles the crate without any problems. |
triage: P-high. self-assigning. removing nomination tag. |
Minimal example: enum Empty {}
enum Enum {
Empty( Empty )
}
fn foobar() -> Option< Enum > {
let value: Option< Empty > = None;
Some( Enum::Empty( value? ) )
}
fn main() {
foobar();
} It works on stable and on beta; it ICEs on nightly. |
I believe this is an assert @oli-obk added at my request - it already existed in miri, but was missing from the original implementation in |
@eddyb can we remove the assertion for now? |
Oops, this slipped into beta (@oli-obk was on vacation and I forgot about it completely). |
(to be fair, it was assigned to me, and I just kept letting it slip on my own priority list as well...) |
reassigning to @oli-obk based on feedback from compiler team |
This regressed here |
I get the following internal compiler error with rustc nightly:
To reproduce, just checkout the repo at the following commit: paritytech/polkadot@3174117
Run:
BUILD_DUMMY_WASM_BINARY=1 cargo build -p polkadot-service
The text was updated successfully, but these errors were encountered: