-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
Internal compiler error on malformed match arm pattern #54379
Comments
Simplified my example some more, this still makes the compiler panic: struct MyStruct {
pub s1: Option<String>,
}
fn main() {
let thing = MyStruct { s1: None };
match thing {
MyStruct { .., Some(_) } => {},
_ => {}
}
} |
It happens within It seems to me that the following rust/src/libsyntax/parse/parser.rs Line 3868 in 3bc2ca7
can be left created but not rust/src/libsyntax/parse/parser.rs Lines 3899 to 3902 in 3bc2ca7
|
Internal compiler error seems interesting, I'll take this. |
@raventid Hi Julian, are you working on this? |
@muattiyah, took a pause, will do it in next few days. So, the answer is yes. |
@raventid Alright, thanks. Good luck 👍 |
I saw no activity for a couple of weeks and I started working in parallel on this. I think I have a fix... |
Fix internal compiler error on malformed match arm pattern. Issue: rust-lang#54379
Looks like the fix was merged. Can this be closed? |
The compiler panics when trying to compile the following code:
Expectation: A compiler error complaining about the malformed match guard pattern.
Actual result: A compiler panic
Meta
This happens with both the lastest stable and nightly versions:
Backtrace (nightly):
Backtrace (stable):
The text was updated successfully, but these errors were encountered: