gccrs: Implement compilation for let <StructPattern> - #4773
Open
Polygonalr wants to merge 1 commit into
Open
Conversation
CohenArthur
reviewed
Aug 8, 2026
CohenArthur
left a comment
Member
There was a problem hiding this comment.
At a first glance this looks good to me, I'll leave it to someone else to review and merge though as I'll be away for a few days and don't want to block this. Thank you!
Polygonalr
force-pushed
the
let-struct-pattern
branch
from
August 8, 2026 15:26
f53f12a to
b6541bf
Compare
Polygonalr
force-pushed
the
let-struct-pattern
branch
from
August 16, 2026 13:51
b6541bf to
9c211a7
Compare
Polygonalr
marked this pull request as ready for review
August 16, 2026 13:52
let <StructPattern>let <StructPattern>
P-E-P
reviewed
Aug 23, 2026
| let Foo {x: another_x} = my_foo; | ||
| my_foo.x = 16; | ||
| let Foo {x: yet_another_x } = my_foo; | ||
| let Bar {0: w, ..} = my_bar; |
Member
There was a problem hiding this comment.
should we add a binding pattern (@) test within a let ?
Contributor
Author
There was a problem hiding this comment.
Added a binding pattern to the execute test, see whether that is what you're looking for
gcc/rust/ChangeLog: * backend/rust-compile-var-decl.h (CompileVarDecl::visit (StructPattern)): Compile variable declarations for use within CompilePatternLet::visit(StructPattern). * backend/rust-compile-pattern.h (CompilePatternLet::visit (StructPattern)): Remove rust_sorry_at. * backend/rust-compile-pattern.cc (CompilePatternLet::visit (StructPattern)): Compile bindings for struct fields. Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
Polygonalr
force-pushed
the
let-struct-pattern
branch
from
August 25, 2026 13:08
9c211a7 to
fd1e982
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.