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

rust: negative polarity removes restrictions on validation of impl blocks #3178

Merged
merged 1 commit into from
Sep 20, 2024

Conversation

philberty
Copy link
Member

@philberty philberty commented Sep 20, 2024

Negative polarity means we can just ignore if any trait items are not implemented.

Fixes #3030

gcc/rust/ChangeLog:

* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): the polarity was reversed
* typecheck/rust-hir-type-check-item.cc: check the polarity

gcc/testsuite/ChangeLog:

* rust/compile/nr2/exclude: nr2 cant handle this
* rust/compile/issue-3030.rs: New test.

…ocks

Negative polarity means we can just ignore if any trait items are not
implemented.

Fxies #3030

gcc/rust/ChangeLog:

	* hir/rust-ast-lower-item.cc (ASTLoweringItem::visit): the polarity was reversed
	* typecheck/rust-hir-type-check-item.cc: check the polarity

gcc/testsuite/ChangeLog:

	* rust/compile/nr2/exclude: nr2 cant handle this
	* rust/compile/issue-3030.rs: New test.

Signed-off-by: Philip Herron <herron.philip@googlemail.com>
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.

thank you!!

@CohenArthur CohenArthur added this pull request to the merge queue Sep 20, 2024
Merged via the queue into master with commit 39eb3a4 Sep 20, 2024
12 checks passed
@philberty philberty deleted the phil/negative-impl branch October 2, 2024 10:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Negative implementations complain about missing methods
2 participants