[WIP] Add Identifier and PathInExpression disambiguation#4455
Draft
powerboat9 wants to merge 4 commits intoRust-GCC:masterfrom
Draft
[WIP] Add Identifier and PathInExpression disambiguation#4455powerboat9 wants to merge 4 commits intoRust-GCC:masterfrom
Identifier and PathInExpression disambiguation#4455powerboat9 wants to merge 4 commits intoRust-GCC:masterfrom
Conversation
Collaborator
Author
|
@CohenArthur it seems like this is breaking because the identifier is getting resolved to the use statement and not the enum item -- thoughts? |
Collaborator
Author
|
Turns out that was actually an issue with match arm scoping |
Collaborator
Author
|
Now depends on #4480 |
Collaborator
Author
|
Looks like this still isn't working with glob use declarations |
gcc/rust/ChangeLog: * resolve/rust-finalize-imports-2.0.cc (GlobbingVisitor::visit_enum_container): Conditionally insert into value namespace as well. * resolve/rust-forever-stack.hxx (ForeverStack::insert_variant): Add template specialization for value namespace. * resolve/rust-name-resolution-context.cc (NameResolutionContext::insert_variant): Allow insertion into value namespace. * resolve/rust-name-resolution-context.h (NameResolutionContext::insert_variant): Likewise. * resolve/rust-toplevel-name-resolver-2.0.cc (TopLevel::insert_enum_variant_or_error_out): Likewise. (TopLevel::visit): Use tweaked insert_enum_variant_or_error_out properly for all enum item kinds. * resolve/rust-toplevel-name-resolver-2.0.h (TopLevel::insert_enum_variant_or_error_out): Tweak function signature. * typecheck/rust-hir-type-check-pattern.cc (TypeCheckPattern::visit): Fix typo. Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
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.
No description provided.