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

Improve handling of ConstantItem during name resolution 2.0 #2900

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

powerboat9
Copy link
Contributor

Removes a redundant function override and replaces usage of Rib::Kind::Item with Rib::Kind::ConstantItem.

Copy link
Member

@CohenArthur CohenArthur left a comment

Choose a reason for hiding this comment

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

thanks!

gcc/rust/ChangeLog:

	* resolve/rust-default-resolver.cc
	(DefaultResolver::visit):
	Check if ConstantItem has an expression before attempting to
	visit the expression, scope with Rib::Kind::ConstantItem instead
	of Rib::Kind::Item.
	* resolve/rust-toplevel-name-resolver-2.0.cc
	(TopLevel::visit): Remove redundant override of ConstantItem
	visitor.
	* resolve/rust-toplevel-name-resolver-2.0.h
	(TopLevel::visit): Likewise.

Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
@CohenArthur
Copy link
Member

Ubuntu doesn't like deps anymore it seems. I'll re-run and merge the PR

@CohenArthur
Copy link
Member

@powerboat9 the rebase here is "non-trivial" because we now need to handle the GlobbingVisitor on top of the TopLevel one. I don't think the change is too difficult but I'll let you decide how you want to deal with it. I'm in favor of merging this

@powerboat9
Copy link
Contributor Author

Going to rebase this onto #3005

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.

None yet

2 participants