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 v2: (unused) Receiver trait #132144

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

adetaylor
Copy link
Contributor

This commit contains a new Receiver trait, which is the basis for the Arbitrary Self Types v2 RFC. This allows smart pointers to be method receivers even if they're not Deref.

This is currently unused by the compiler - a subsequent PR will start to use this for method resolution if the arbitrary_self_types feature gate is enabled. This is being landed first simply to make review simpler: if people feel this should all be in an atomic PR let me know.

This is a part of the arbitrary self types v2 project, rust-lang/rfcs#3519
#44874

r? @wesleywiser

This commit contains a new Receiver trait, which is the basis for the
Arbitrary Self Types v2 RFC. This allows smart pointers to be method
receivers even if they're not Deref.

This is currently unused by the compiler - a subsequent PR will start to
use this for method resolution if the arbitrary_self_types feature gate
is enabled. This is being landed first simply to make review
simpler: if people feel this should all be in an atomic PR let me know.

This is a part of the arbitrary self types v2 project,
rust-lang/rfcs#3519
rust-lang#44874

r? @wesleywiser
@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. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Oct 25, 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 Oct 25, 2024
@adetaylor adetaylor marked this pull request as ready for review October 25, 2024 21:54
@adetaylor
Copy link
Contributor Author

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

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Oct 25, 2024
@adetaylor
Copy link
Contributor Author

@wesleywiser, thanks for triggering the crater run on the previous PR. There are only two crates broken by the removal of the Receiver trait - so I think we're good to go ahead and land this PR once you're happy with it.

Copy link
Member

@wesleywiser wesleywiser left a comment

Choose a reason for hiding this comment

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

Changes look good. I don't think this needs a signoff from T-libs for the same reasons as mentioned in #130225 (comment) by T-libs member. I will just cc @rust-lang/libs in case I'm totally off-base here.

@wesleywiser
Copy link
Member

@bors r+

@bors
Copy link
Contributor

bors commented Nov 11, 2024

📌 Commit ecfcd08 has been approved by wesleywiser

It is now in the queue for this repository.

@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 Nov 11, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 11, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#120077 (Add Set entry API )
 - rust-lang#132144 (Arbitrary self types v2: (unused) Receiver trait)
 - rust-lang#132297 (Document some `check_expr` methods, and other misc `hir_typeck` tweaks)
 - rust-lang#132820 (Add a default implementation for CodegenBackend::link)
 - rust-lang#132881 (triagebot: Autolabel rustdoc book)
 - rust-lang#132912 (Simplify some places that deal with generic parameter defaults)
 - rust-lang#132916 (Unvacation fmease)

r? `@ghost`
`@rustbot` modify labels: rollup
bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2024
…iaskrgr

Rollup of 7 pull requests

Successful merges:

 - rust-lang#120077 (Add Set entry API )
 - rust-lang#132144 (Arbitrary self types v2: (unused) Receiver trait)
 - rust-lang#132297 (Document some `check_expr` methods, and other misc `hir_typeck` tweaks)
 - rust-lang#132820 (Add a default implementation for CodegenBackend::link)
 - rust-lang#132881 (triagebot: Autolabel rustdoc book)
 - rust-lang#132912 (Simplify some places that deal with generic parameter defaults)
 - rust-lang#132916 (Unvacation fmease)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9d7facc into rust-lang:master Nov 12, 2024
6 checks passed
@rustbot rustbot added this to the 1.84.0 milestone Nov 12, 2024
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request Nov 12, 2024
Rollup merge of rust-lang#132144 - adetaylor:receiver-trait-itself, r=wesleywiser

Arbitrary self types v2: (unused) Receiver trait

This commit contains a new `Receiver` trait, which is the basis for the Arbitrary Self Types v2 RFC. This allows smart pointers to be method receivers even if they're not Deref.

This is currently unused by the compiler - a subsequent PR will start to use this for method resolution if the `arbitrary_self_types` feature gate is enabled. This is being landed first simply to make review simpler: if people feel this should all be in an atomic PR let me know.

This is a part of the arbitrary self types v2 project, rust-lang/rfcs#3519
rust-lang#44874

r? `@wesleywiser`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants