Resolve non-final path segments in type namespace#4525
Open
powerboat9 wants to merge 1 commit intoRust-GCC:masterfrom
Open
Resolve non-final path segments in type namespace#4525powerboat9 wants to merge 1 commit intoRust-GCC:masterfrom
powerboat9 wants to merge 1 commit intoRust-GCC:masterfrom
Conversation
This is very hack-y, and the ForeverStack/NameResolutionContext boundary is due for some major refactoring, but should be correct. gcc/rust/ChangeLog: * resolve/rust-forever-stack.h (class ForeverStack): Friend other ForeverStack specializations. (ForeverStack::resolve_path): Add parameter for type namespace ForeverStack instance. (ForeverStack::resolve_segments): Likewise. * resolve/rust-forever-stack.hxx (ForeverStack::resolve_segments): Specialize for different namespaces. (ForeverStack::resolve_path): Pass a type namespace ForeverStack instance to resolve_segments. * resolve/rust-name-resolution-context.h (NameResolutionContext::resolve_path): Pass a type namespace ForeverStack instance to ForeverStack::resolve_path. gcc/testsuite/ChangeLog: * rust/compile/name_resolution27.rs: New test. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
Member
|
Hey @powerboat9 sorry for the confusion, I actually have a branch with these changes which I think is less hacky. We ended up working on the same thing in parallel. I didn't think you would work on this as well, my apologies. I'll submit my branch this weekend and we can see which approach we like best. Apologies :( |
Collaborator
Author
|
No worries, I figured you had probably been working on something similar, though I wasn't sure how far along you had gotten with it, or if you had abandoned it for being too hack-y. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is very hack-y, and the
ForeverStack/NameResolutionContextboundary is due for some major refactoring, but should be correct. Credit to @CohenArthur for mentioning the idea in DMs