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

Resolve instances of TypePath more accurately #3220

Merged
merged 1 commit into from
Feb 4, 2025

Conversation

powerboat9
Copy link
Collaborator

Depends on #3219

@powerboat9 powerboat9 changed the title Resolve instances of TypePath more accurately Resolve instances of TypePath more accurately Oct 26, 2024
@powerboat9
Copy link
Collaborator Author

Should I try to edit this, or keep it as-is?

Copy link
Member

@philberty philberty left a comment

Choose a reason for hiding this comment

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

I feel like this class is unrelated to the forever stack. I think this should be in its own file

@powerboat9
Copy link
Collaborator Author

I feel like this class is unrelated to the forever stack. I think this should be in its own file

Fixed, and now depends on #3377

gcc/rust/ChangeLog:

	* util/rust-unwrap-segment.cc: New file.
	* util/rust-unwrap-segment.h: New file.
	* Make-lang.in: Add rust-unwrap-segment.o to the object list.
	* resolve/rust-forever-stack.hxx: Include rust-unwrap-segment.h.
	(ForeverStack::find_starting_point): Use unwrap_type_segment.
	(ForeverStack::resolve_segments): Likewise.
	(ForeverStack::resolve_path): Likewise.
	* resolve/rust-late-name-resolver-2.0.cc
	(Late::visit): Resolve type paths using
	NameResolutionContext::resolve_path.
	* resolve/rust-name-resolution-context.h
	(NameResolutionContext::resolve_path): Use
	unwrap_segment_node_id.

gcc/testsuite/ChangeLog:

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

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

@P-E-P P-E-P left a comment

Choose a reason for hiding this comment

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

Looks great!

@P-E-P P-E-P added this pull request to the merge queue Feb 4, 2025
Merged via the queue into Rust-GCC:master with commit ca227ed Feb 4, 2025
12 checks passed
@powerboat9 powerboat9 deleted the fix-type branch February 4, 2025 15:22
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.

4 participants