-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Pattern matching with overlapping matches crash the compiler #12369
Comments
Very similar to #11241.
|
I think I've encounter the same error with the following code: fn main() {
enum List {
Cons(int, ~List),
Nil
}
let x = ~Cons(1, ~Nil);
match *x {
Cons(a, ~ref next) => (),
Cons(b, ~Nil) => (),
_ => ()
}
} With this build:
(I couldn't use the shorter MCE because apparently unique vector patterns are no longer supported) Here is the backtrace:
|
@daimrod that's possibly slightly different (at least, the failure message is different, although they're in the same area of code). Btw, the MCE still works when used without unique vectors: fn main() {
match &[] {
[] => (),
[2, ..] => (),
[3, 4, ..] => ()
}
}
|
@huonw Ok, should I open a dedicated issue? |
…gression, r=flip1995 Fix `nonminimal_bool` lint regression Fixes rust-lang#12371. Fixes rust-lang#12369. cc `@RalfJung` The problem was an invalid condition. Shame on me... changelog: Fix `nonminimal_bool` lint regression
The following code, compiled on Ubuntu 12.04.3 LTS Precise Pangolin - Release i386 (20130820.1) :
causes rustc to spew forth:
stack trace:
The text was updated successfully, but these errors were encountered: