Skip to content

Add new function ClosureExpr::get_definition_expr #3815

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

Merged
merged 1 commit into from
Jun 10, 2025

Conversation

powerboat9
Copy link
Collaborator

@powerboat9 powerboat9 commented Jun 9, 2025

I have another commit in the pipeline which depends on this and fixes test execute/torture/closure4.rs under name resolution 2.0

gcc/rust/ChangeLog:

	* ast/rust-expr.h (ClosureExpr::get_definition_expr): New
	virtual member function.
	(ClosureExprInner::get_definition_expr): Add override specifier.
	(ClosureExprInnerTyped::get_definition_block): Rename to...
	(ClosureExprInnerTyped::get_definition_expr): ...here and add
	override specifier.

	* ast/rust-ast-collector.cc (TokenCollector::visit): Handle
	rename of ClosureExprInnerTyped::get_definition_block to
	ClosureExprInnerTyped::get_definition_expr.
	* ast/rust-ast-visitor.cc (DefaultASTVisitor::visit): Likewise.
	* expand/rust-cfg-strip.cc (CfgStrip::visit): Likewise.
	* expand/rust-expand-visitor.cc (ExpandVisitor::visit):
	Likewise.
	* hir/rust-ast-lower-expr.cc (ASTLoweringExpr::visit): Likewise.
	* resolve/rust-ast-resolve-expr.cc (ResolveExpr::visit):
	Likewise.
	* resolve/rust-late-name-resolver-2.0.cc (Late::visit):
	Likewise.

Signed-off-by: Owen Avery <[email protected]>
Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

LGTM!

@CohenArthur CohenArthur added this pull request to the merge queue Jun 10, 2025
Merged via the queue into Rust-GCC:master with commit de087b6 Jun 10, 2025
12 checks passed
@powerboat9 powerboat9 deleted the closure-adjust branch June 10, 2025 12:47
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.

2 participants