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

Adjust self-type check to require equality #85511

Merged
merged 1 commit into from
May 21, 2021

Conversation

Mark-Simulacrum
Copy link
Member

@Mark-Simulacrum Mark-Simulacrum commented May 20, 2021

When we encounter SomeType::<X>::foo, self_ty is SomeType<X> and the method is defined in an impl on SomeType<A>. Previously, we required simply that self_ty <: impl_ty, but this is too lax: we should require equality in order to use the method. This was found as part of unrelated work on never type stabilization, but also fixes one of the wf test cases.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label May 20, 2021
@nikomatsakis
Copy link
Contributor

@bors r+

@bors
Copy link
Contributor

bors commented May 20, 2021

📌 Commit a4bb0ba533c6fa6cb073e9eae5630adb0de87a62 has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 20, 2021
@Mark-Simulacrum
Copy link
Member Author

@bors rollup=never - might want to bisect to this if it causes regressions in the wild

@bors
Copy link
Contributor

bors commented May 21, 2021

⌛ Testing commit a4bb0ba533c6fa6cb073e9eae5630adb0de87a62 with merge ca72f607d93aeb36c5c8eef02e7b1a4a17d60b8f...

@rust-log-analyzer

This comment has been minimized.

@bors
Copy link
Contributor

bors commented May 21, 2021

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels May 21, 2021
@nikomatsakis
Copy link
Contributor

@Mark-Simulacrum needs a bless?

@Mark-Simulacrum
Copy link
Member Author

@bors r=nikomatsakis

@bors
Copy link
Contributor

bors commented May 21, 2021

📌 Commit 4b4382d has been approved by nikomatsakis

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels May 21, 2021
@bors
Copy link
Contributor

bors commented May 21, 2021

⌛ Testing commit 4b4382d with merge 9c0379c...

@bors
Copy link
Contributor

bors commented May 21, 2021

☀️ Test successful - checks-actions
Approved by: nikomatsakis
Pushing 9c0379c to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label May 21, 2021
@bors bors merged commit 9c0379c into rust-lang:master May 21, 2021
@rustbot rustbot added this to the 1.54.0 milestone May 21, 2021
@Mark-Simulacrum Mark-Simulacrum deleted the eq-not-sup branch May 22, 2021 03:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants