rust/src/libcore/ops
Michael Hewson 153f5a7892 Stabilize Rc, Arc and Pin as method receivers
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.
2018-12-20 01:14:01 -05:00
..
arith.rs Auto merge of #50149 - aaronaaeng:master, r=estebank 2018-04-28 04:14:12 +00:00
bit.rs Auto merge of #50149 - aaronaaeng:master, r=estebank 2018-04-28 04:14:12 +00:00
deref.rs Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
drop.rs Update drop.rs 2018-04-01 16:19:42 -07:00
function.rs Add #[must_use] attribute to stdlib traits 2018-12-10 14:45:26 +00:00
generator.rs Use impl_header_lifetime_elision in libcore 2018-09-29 21:33:35 -07:00
index.rs Add message to rustc_on_unimplemented attributes in core 2018-06-19 15:19:13 -07:00
mod.rs Stabilize Rc, Arc and Pin as method receivers 2018-12-20 01:14:01 -05:00
range.rs constify parts of libcore. 2018-11-10 01:07:32 +01:00
try.rs add more aliases 2018-04-21 22:02:53 +02:00
unsize.rs Bump to 1.33.0 2018-12-12 08:09:26 -08:00