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

Resolve impl block type with name resolution 2.0 #2952

Merged
merged 2 commits into from
Apr 22, 2024

Conversation

P-E-P
Copy link
Member

@P-E-P P-E-P commented Apr 18, 2024

Fixes #2946

Inherent impl has a type it applies to. This type
was not visited and thus not resolved.

gcc/rust/ChangeLog:

	* resolve/rust-default-resolver.cc (DefaultResolver::visit): Visit
	inherent impl type.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
A previous bug with name resolution 2.0 was caused by an incorrectly
resolved inherent impl name. This test shall highlight the behavior
and prevent regression.

gcc/testsuite/ChangeLog:

	* rust/compile/name_resolution25.rs: New test.

Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
@P-E-P P-E-P added this to the Name Resolution rework milestone Apr 18, 2024
@P-E-P P-E-P requested a review from CohenArthur April 19, 2024 08:15
@P-E-P P-E-P self-assigned this Apr 19, 2024
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! nice catch :)

@CohenArthur CohenArthur added this pull request to the merge queue Apr 22, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to no response for status checks Apr 22, 2024
@P-E-P P-E-P added this pull request to the merge queue Apr 22, 2024
Merged via the queue into Rust-GCC:master with commit 5b6c982 Apr 22, 2024
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

Name resolution 2.0 impl block not resolved
2 participants