Skip to content

gccrs: Lower IdentifierPattern's to_bind to HIR#3811

Merged
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Polygonalr:identifierpattern-subpattern-lower
Jun 9, 2025
Merged

gccrs: Lower IdentifierPattern's to_bind to HIR#3811
CohenArthur merged 1 commit into
Rust-GCC:masterfrom
Polygonalr:identifierpattern-subpattern-lower

Conversation

@Polygonalr

@Polygonalr Polygonalr commented Jun 7, 2025

Copy link
Copy Markdown
Contributor

This is part of making compilation of subpatterns (called to_bind in the code) of IdentifierPattern work.

May be off-topic for this PR, but to those who have more experience with project, I'm currently having issues with Resolver::TypeCheckContext not storing the type of the lowered subpattern, which does not allow me to make changes to successfully compile the subpattern. Any advice will be appreciated!

@Polygonalr Polygonalr force-pushed the identifierpattern-subpattern-lower branch from c565e97 to 8f161cd Compare June 7, 2025 14:48
gcc/rust/ChangeLog:

	* hir/rust-ast-lower-pattern.cc: Lower of IdentifierPattern's to_bind to HIR.
	* hir/rust-hir-dump.cc: Update IdentifierPattern's dump to properly show to_bind's full
	full properties.

Signed-off-by: Yap Zhi Heng <yapzhhg@gmail.com>
@Polygonalr Polygonalr force-pushed the identifierpattern-subpattern-lower branch from 8f161cd to 2f020b9 Compare June 7, 2025 15:06
@powerboat9

Copy link
Copy Markdown
Collaborator

Check out TypeCheckPattern::visit

@CohenArthur CohenArthur left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this looks good to me! thank you for the work! your commit message is great as well, well done

@CohenArthur CohenArthur added this pull request to the merge queue Jun 9, 2025
Merged via the queue into Rust-GCC:master with commit c623f86 Jun 9, 2025
12 checks passed
@Polygonalr Polygonalr deleted the identifierpattern-subpattern-lower branch June 13, 2025 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants