diff options
| author | Michael Hewson <michael@michaelhewson.ca> | 2018-10-03 23:40:21 -0400 |
|---|---|---|
| committer | Michael Hewson <michael@michaelhewson.ca> | 2018-11-01 18:16:59 -0400 |
| commit | f12c250e40650e6103161f986f02a84b7357bdc9 (patch) | |
| tree | c79c2edee2f4e22e63cd3baef0b0bebd982c103d /src/rustllvm/RustWrapper.cpp | |
| parent | c29641e067d44c754fbc6a40e463a7e4d45ab31e (diff) | |
| download | rust-f12c250e40650e6103161f986f02a84b7357bdc9.tar.gz rust-f12c250e40650e6103161f986f02a84b7357bdc9.zip | |
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
