Skip to content

Conversation

powerboat9
Copy link
Collaborator

No description provided.

gcc/rust/ChangeLog:

	* resolve/rust-default-resolver.cc
	(DefaultResolver::visit_for_pattern): New virtual member
	function definition.
	(DefaultResolver::visit): Ensure iterator expression is properly
	scoped.
	* resolve/rust-default-resolver.h
	(DefaultResolver::visit_for_pattern): New virtual member
	function declaration.
	* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
	function overload for ForLoopExpr, moving binding handling to...
	(Late::visit_for_pattern): ...a new function here.
	* resolve/rust-late-name-resolver-2.0.h (Late::visit): Remove
	ForLoopExpr visitor function.
	(Late::visit_for_pattern): New function.

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 but what does this fix? any issues we should add as testcases?

@powerboat9
Copy link
Collaborator Author

Trying to find a testcase -- it looks like, actually, for-loops shouldn't be making it to late resolution anyways

@philberty
Copy link
Member

if thats the case i would close the PR

@powerboat9 powerboat9 closed this Sep 3, 2025
@powerboat9 powerboat9 deleted the fix-for branch September 3, 2025 22:19
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