-
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: Unexpected panic in libcollections/vec.rs #42679
Comments
Minimal testcase that I found: https://play.rust-lang.org/?gist=e5f4ef65f86afc84b1eca43ac545c3ec&version=nightly&backtrace=1 Matching like this is fine: match (a, b) {
(box Test::Foo(x), box Test::Bar(y)) => println!("Foo {}, Bar {}", x, y),
_ => println!("Some other things"),
} This is also fine: match (a, b) {
(a, box Test::Bar(y)) => println!("Some other {:?}, Bar {}", a, y),
(box a, b) => println!("Some unboxed {:?}, some boxed {:?}", a, b),
} |
Mark-Simulacrum
added a commit
to Mark-Simulacrum/rust
that referenced
this issue
Jun 18, 2017
Use T as the subpattern type of Box<T> The subpattern type of boxes being nil does not make sense because of box patterns. They should have their inner type as the subpattern type. Fixes rust-lang#42679, which describes ICE caused by the bug.
frewsxcv
added a commit
to frewsxcv/rust
that referenced
this issue
Jun 18, 2017
Use T as the subpattern type of Box<T> The subpattern type of boxes being nil does not make sense because of box patterns. They should have their inner type as the subpattern type. Fixes rust-lang#42679, which describes ICE caused by the bug.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I was editing the following code when the bug appeared:
Apparently swapping
To the front of the match expression results in a sane compile error which is equally unfortunate to me since nothing moved in theory when the default case triggers.
Output with
RUST_BACKTRACE=1
Output with
RUST_BACKTRACE=full
The text was updated successfully, but these errors were encountered: