Skip to content
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

nr2.0: Resolve paths which start with Self #3416

Merged
merged 1 commit into from
Feb 17, 2025

Conversation

powerboat9
Copy link
Collaborator

Overlaps with #3391 (apologies to @P-E-P, but this should be a more general resolution), depends on #3220

@P-E-P
Copy link
Member

P-E-P commented Feb 4, 2025

Overlaps with #3391 (apologies to @P-E-P, but this should be a more general resolution), depends on #3220

I'm kinda glad you came up with another solution because mine felt wrong and I was even thinking about starting it from scratch again.

gcc/rust/ChangeLog:

	* resolve/rust-forever-stack.hxx
	(ForeverStack::find_starting_point): Be more careful about
	applying ForeverStack::find_closest_module.
	(ForeverStack::resolve_segments): Allow traversal into parent
	nodes when not in a module node or root node, which
	ForeverStack::find_starting_point previously made moot through
	use of ForeverStack::find_closest_module. Also, when a child
	node lookup fails when resolving in the type namespace, attempt
	a rib lookup as a fallback.
	* resolve/rust-late-name-resolver-2.0.cc
	(Late::visit): Avoid throwing a resolution error for type paths
	when the typechecker may be able to finish the resolution. Also,
	throw an error when a resolution is ambiguous.

gcc/testsuite/ChangeLog:

	* rust/compile/nr2/exclude: Remove entries.

Signed-off-by: Owen Avery <[email protected]>
@P-E-P P-E-P added this pull request to the merge queue Feb 5, 2025
@P-E-P P-E-P removed this pull request from the merge queue due to a manual request Feb 5, 2025
@P-E-P P-E-P requested a review from CohenArthur February 5, 2025 13:02
@powerboat9
Copy link
Collaborator Author

@CohenArthur

@CohenArthur
Copy link
Member

thanks! LGTM :)

@CohenArthur CohenArthur added this pull request to the merge queue Feb 17, 2025
Merged via the queue into Rust-GCC:master with commit 681805f Feb 17, 2025
12 checks passed
@powerboat9 powerboat9 deleted the fix-type-access branch February 17, 2025 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

Successfully merging this pull request may close these issues.

3 participants