Skip to content

[WIP] Add Identifier and PathInExpression disambiguation#4455

Draft
powerboat9 wants to merge 4 commits intoRust-GCC:masterfrom
powerboat9:fix-enum
Draft

[WIP] Add Identifier and PathInExpression disambiguation#4455
powerboat9 wants to merge 4 commits intoRust-GCC:masterfrom
powerboat9:fix-enum

Conversation

@powerboat9
Copy link
Collaborator

No description provided.

@powerboat9
Copy link
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?

@powerboat9
Copy link
Collaborator Author

Turns out that was actually an issue with match arm scoping

@powerboat9
Copy link
Collaborator Author

Now depends on #4480

@powerboat9
Copy link
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>
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.

1 participant