-
Notifications
You must be signed in to change notification settings - Fork 173
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
Fix lookup of TuplePattern
sub-pattern types
#2848
Conversation
gcc/rust/ChangeLog: * backend/rust-compile-pattern.cc (CompilePatternLet::visit): Lookup type of sub-pattern, not tuple pattern itself. gcc/testsuite/ChangeLog: * rust/compile/issue-2847-b.rs: New test. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks :) can you change your PR's main comment so that #2847 isn't closed by this PR? the original code still causes an ICE
It looks like I managed to fix it |
I checked out your commit and still get an ICE for the original testcase:
|
I fixed the issue pointed out in the linked comment, which seems to be mostly unrelated to #2847 itself fn myfun() -> i32 {
let (x, _) = (1, 2);
x
} |
thanks :) |
Fixes the issue pointed out in this comment.