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

Arbitrary self types: diagnostics for mismatched self types #129968

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

Conversation

adetaylor
Copy link
Contributor

@adetaylor adetaylor commented Sep 4, 2024

Add extra diagnostics for cases where self types don't match.

Most of this is new tests. These are slightly duplicative of the existing arbitrary-self-from-method-substs.rs test, but test more permutations so it seems worth adding to the coverage as we explore improving the diagnostics here.

Improved diagnostics were suggested in commit 05c5caa

This is a part of the arbitrary self types v2 project, rust-lang/rfcs#3519
and specifically the sub-issue exploring questions around generics,
#129147

Tracking:

@rustbot
Copy link
Collaborator

rustbot commented Sep 4, 2024

r? @jieyouxu

rustbot has assigned @jieyouxu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Sep 4, 2024
@adetaylor
Copy link
Contributor Author

@rustbot label +S-waiting-on-author -S-waiting-on-review

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Sep 4, 2024
@adetaylor adetaylor force-pushed the arbitrary-self-types-fix-generic-diagnostics branch from 3c0de63 to 424067a Compare September 4, 2024 21:42
@adetaylor
Copy link
Contributor Author

r? @wesleywiser

(but not ready for review yet)

@rustbot rustbot assigned wesleywiser and unassigned jieyouxu Sep 4, 2024
@traviscross traviscross added the F-arbitrary_self_types `#![feature(arbitrary_self_types)]` label Sep 4, 2024
@adetaylor adetaylor force-pushed the arbitrary-self-types-fix-generic-diagnostics branch from 424067a to deb750a Compare September 4, 2024 21:48
@rust-log-analyzer

This comment has been minimized.

@adetaylor adetaylor force-pushed the arbitrary-self-types-fix-generic-diagnostics branch from deb750a to f13ebc7 Compare September 5, 2024 10:54
@adetaylor adetaylor changed the title Arbitrary self types: tests for 'mismatched types' Arbitrary self types: diagnostics for mismatched self types Sep 5, 2024
@adetaylor adetaylor force-pushed the arbitrary-self-types-fix-generic-diagnostics branch from 23db43a to 0c993f8 Compare September 8, 2024 09:23
@bors
Copy link
Contributor

bors commented Sep 23, 2024

☔ The latest upstream changes (presumably #130724) made this pull request unmergeable. Please resolve the merge conflicts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
F-arbitrary_self_types `#![feature(arbitrary_self_types)]` S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants