diff options
| author | bors <bors@rust-lang.org> | 2018-12-22 01:42:25 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-22 01:42:25 +0000 |
| commit | abaa9344d4c10a45d7725534145007a8284dabe8 (patch) | |
| tree | 274fef4b6785a676159957406e2dac3d76cbfb36 /src/libstd/sys/redox/stack_overflow.rs | |
| parent | a9ff13562f1e7f0543e3bdc3949e21cf88c7b0a9 (diff) | |
| parent | 286503ace2fd1fc8ac8bf8aa10378fb93763d99f (diff) | |
| download | rust-abaa9344d4c10a45d7725534145007a8284dabe8.tar.gz rust-abaa9344d4c10a45d7725534145007a8284dabe8.zip | |
Auto merge of #56805 - mikeyhew:stabilize-pin-as-receiver, r=nikomatsakis
Stabilize `Rc`, `Arc` and `Pin` as method receivers Replaces #55880 Closes #55786 r? @nikomatsakis cc @withoutboats @cramertj This lets you write methods using `self: Rc<Self>`, `self: Arc<Self>`, `self: Pin<&mut Self>`, `self: Pin<Box<Self>`, and other combinations involving `Pin` and another stdlib receiver type, without needing the `arbitrary_self_types`. Other user-created receiver types can be used, but they still require the feature flag to use. This is implemented by introducing a new trait, `Receiver`, which the method receiver's type must implement if the `arbitrary_self_types` feature is not enabled. To keep composed receiver types such as `&Arc<Self>` unstable, the receiver type is also required to implement `Deref<Target=Self>` when the feature flag is not enabled. This lets you use `self: Rc<Self>` and `self: Arc<Self>` in stable Rust, which was not allowed previously. It was agreed that they would be stabilized in #55786. `self: Pin<&Self>` and other pinned receiver types do not require the `arbitrary_self_types` feature, but they cannot be used on stable because `Pin` still requires the `pin` feature.
Diffstat (limited to 'src/libstd/sys/redox/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
