-
Notifications
You must be signed in to change notification settings - Fork 13.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
internal compiler error: trans_lvalue reached fall-through case #7507
Comments
I also just hit this today. An even simpler test case: fn main() {
let (x,y) = (1,2);
(x,y) = (3,4);
}
|
Reproduced with 5ef8cdb (both cases). |
Similar ICE with structs:
|
The simplest case I think:
|
It's because So |
My impression is that
and I'd love to be able to just say
|
I forgot to mention about mutability; currently Anyway, I agree with @kballard; it's not cool to unpack manually. |
Clearly something in the compiler is not checking that the LHS of an assignment is actually an lvalue. Kind of amusing. Rather surprising that this gets through borrowck, I'll have to look at that. It's probably assuming that an earlier pass would have caught such cases. Anyway, it'd be nice to permit |
Remove `or_patterns` feature gate in example changelog: removed `or_patterns` feature gate in the code example for the [`unnested_or_patterns`] lint
When compiling the following code:
I get the error:
Compiled with: 8883099
The text was updated successfully, but these errors were encountered: