-
Notifications
You must be signed in to change notification settings - Fork 12.3k
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: task 'rustc' panicked at 'called Option::unwrap()
on a None
value'
#19340
Comments
I've actually narrowed this down to a single match expression; I'm trying to make sense of it, or at least make a reproducible test-case. I don't see anything particularly interesting about the match:
It is matching a struct-like enum (defined in an external crate.) Here is an abbreviated definition of
|
Is this an issue with namespaced enums? Perhaps it should be |
Tried using the namespaced variants, as well as removing the I'm wondering if it's related to the struct-like enums? This is the only code I have that uses them. The other thing is that I'm moving values out of the enum: I'm wondering if it's interacting poorly with some of the recent changes to "structural fragments" (commit 0e06f71). |
If I match on So it seems to be related to moving the values out of the struct-enum. |
I do have a minimally reproducible test case; but so far as I can tell you need to define it in two completely separate crates.
When I defined |
This also happens for me with |
I'm getting this ICE as well, when I try to move values out of struct-like enums. It happens on these lines: https://github.com/ogham/arity/blob/94f7db622adb8cd51d56761f30af35d77e3c5d5b/src/ast.rs#L183 The stacktrace is somewhat different, though:
|
barosl's PR compiles my code w/ no issues 👍 |
Fixes the first case of rust-lang#19340.
Fixes the second case of rust-lang#19340.
cargo 0.0.1-pre-nightly (1bdfb25 2014-11-20 19:29:22 +0000)
Linux DARKBLUE 3.17.2-1-ARCH #1 SMP PREEMPT Thu Oct 30 20:49:39 CET 2014 x86_64 GNU/Linux
Wish I could offer up the code; but it's a closed source project.
This code does nothing w/ lifetime parameters or stored references, though. There's just a few boxed traits w/ a +'static bound.
The text was updated successfully, but these errors were encountered: