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

nr2.0: Handle Self properly in trait definitions #3323

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

Conversation

powerboat9
Copy link
Contributor

No description provided.

gcc/rust/ChangeLog:

	* ast/rust-ast-visitor.cc
	(DefaultASTVisitor::visit): Visit implicit Self parameters of
	traits.
	* resolve/rust-late-name-resolver-2.0.cc
	(Late::visit): Resolve implicit Self parameters of traits.
	* resolve/rust-late-name-resolver-2.0.h:
	(Late::visit): Add trait visitor.
	* resolve/rust-toplevel-name-resolver-2.0.cc
	(TopLevel::visit): Insert resolutions for Self type parameters
	as well.

gcc/testsuite/ChangeLog:

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

Signed-off-by: Owen Avery <[email protected]>
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.

LGTM, well done!

void
Late::visit (AST::Trait &trait)
{
// kind of weird how this is done
Copy link
Member

Choose a reason for hiding this comment

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

very nitpicky but could you add a comment here explaining the weirdness? will be helpful for future contributors

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.

2 participants