Commit Graph

65 Commits

Author SHA1 Message Date
Daniel Alley
38d2f9b470 Fix docstring spelling mistakes 2018-11-09 23:14:46 -05:00
Michael Hewson
f12c250e40 Replace CoerceSized trait with DispatchFromDyn
Rename `CoerceSized` to `DispatchFromDyn`, and reverse the direction so that, for example, you write

```
impl<T: Unsize<U>, U> DispatchFromDyn<*const U> for *const T {}
```

instead of

```
impl<T: Unsize<U>, U> DispatchFromDyn<*const T> for *const U {}
```

this way the trait is really just a subset of `CoerceUnsized`.

The checks in object_safety.rs are updated for the new trait, and some documentation and method names in there are updated for the new trait name — e.g. `receiver_is_coercible` is now called `receiver_is_dispatchable`. Since the trait now works in the opposite direction, some code had to updated here for that too.

I did not update the error messages for invalid `CoerceSized` (now `DispatchFromDyn`) implementations, except to find/replace `CoerceSized` with `DispatchFromDyn`. Will ask for suggestions in the PR thread.
2018-11-01 18:16:59 -04:00
Michael Hewson
192900e7c2 Add CoerceSized impls throughout libstd
This will make receiver types like `Rc<Self>` and `Pin<&mut Self>`
object-safe.
2018-11-01 18:16:22 -04:00
Matthias Krüger
4972beaf65 fix typos in various places 2018-10-23 15:56:25 +02:00
Alexander Ronald Altman
bb0abe98a7
Remove useless lifetimes from Pin impls. 2018-09-26 16:03:05 -05:00
Taylor Cramer
574bca7262 Cleanup Deref impls and add ?Sized bound to &mut T impls 2018-09-18 15:42:51 -07:00
Taylor Cramer
3ec1810e32 Cleanup and fix method resolution issue 2018-09-17 16:31:33 -07:00
Without Boats
974bdc80fe
Update to a new pinning API. 2018-09-01 06:57:58 +02:00
Niv Kaminer
83ca347343 remove copyright headers now that they are not madatory 2018-08-25 00:07:00 +03:00
Niv Kaminer
b26cce5ec0 link to items in pin module to std docs 2018-08-23 10:16:58 +03:00
Niv Kaminer
871e89b351 capitalize and punctuate libcore pin module 2018-08-23 02:13:01 +03:00
Niv Kaminer
1c26be3929 fix broken link to Unpin due to reexport 2018-08-23 02:13:01 +03:00
Niv Kaminer
2f501a1bc4 fix PinMut documentation 2018-08-23 01:37:03 +03:00
Niv Kaminer
30bb4af5d8 add top-level documentation to the std pin module 2018-08-23 01:37:03 +03:00
Niv Kaminer
13da951868 move PinMut into pin module and export through std 2018-08-23 01:37:03 +03:00