Rollup merge of #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, https://github.com/rust-lang/rfcs/pull/3519
https://github.com/rust-lang/rust/issues/44874

r? `@wesleywiser`
This commit is contained in:
Matthias Krüger 2024-11-11 21:58:29 +01:00 committed by GitHub
commit 9d7faccffc
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 93 additions and 2 deletions

View file

@ -1568,6 +1568,8 @@ symbols! {
readonly,
realloc,
reason,
receiver,
receiver_target,
recursion_limit,
reexport_test_harness_main,
ref_pat_eat_one_layer_2024,