|
1 | 1 | error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment that don't mention type/const generics, and nothing else |
2 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:10:1 |
| 2 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:19:1 |
3 | 3 | | |
4 | 4 | LL | / impl<T, U> DispatchFromDyn<WrapperWithExtraField<U>> for WrapperWithExtraField<T> |
5 | 5 | LL | | |
6 | 6 | LL | | where |
7 | | -LL | | T: DispatchFromDyn<U>, |
8 | | - | |__________________________^ |
| 7 | +LL | | T: DispatchFromDyn<U> |
| 8 | + | |_________________________^ |
9 | 9 | | |
10 | 10 | = note: extra field `1` of type `i32` is not allowed |
11 | 11 |
|
12 | 12 | error[E0375]: implementing `DispatchFromDyn` does not allow multiple fields to be coerced |
13 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:22:1 |
| 13 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:32:1 |
14 | 14 | | |
15 | 15 | LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<MultiplePointers<U>> for MultiplePointers<T> |
16 | 16 | LL | | |
17 | 17 | LL | | where |
18 | | -LL | | T: Unsize<U>, |
19 | | - | |_________________^ |
| 18 | +LL | | T: Unsize<U> |
| 19 | + | |________________^ |
20 | 20 | | |
21 | 21 | note: the trait `DispatchFromDyn` may only be implemented when a single field is being coerced |
22 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:18:5 |
| 22 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:28:5 |
23 | 23 | | |
24 | 24 | LL | ptr1: *const T, |
25 | 25 | | ^^^^^^^^^^^^^^ |
26 | 26 | LL | ptr2: *const T, |
27 | 27 | | ^^^^^^^^^^^^^^ |
28 | 28 |
|
29 | 29 | error[E0374]: implementing `DispatchFromDyn` requires a field to be coerced |
30 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:33:1 |
| 30 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:44:1 |
31 | 31 | | |
32 | 32 | LL | impl<T: ?Sized, U: ?Sized> DispatchFromDyn<NothingToCoerce<T>> for NothingToCoerce<U> {} |
33 | 33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
34 | 34 | | |
35 | 35 | = note: expected a single field to be coerced, none found |
36 | 36 |
|
37 | 37 | error[E0378]: structs implementing `DispatchFromDyn` may not have `#[repr(packed)]` or `#[repr(C)]` |
38 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:39:1 |
| 38 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:51:1 |
39 | 39 | | |
40 | 40 | LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<HasReprC<U>> for HasReprC<T> |
41 | 41 | LL | | |
42 | 42 | LL | | where |
43 | | -LL | | T: Unsize<U>, |
44 | | - | |_________________^ |
| 43 | +LL | | T: Unsize<U> |
| 44 | + | |________________^ |
45 | 45 |
|
46 | 46 | error[E0378]: the trait `DispatchFromDyn` may only be implemented for structs containing the field being coerced, ZST fields with 1 byte alignment that don't mention type/const generics, and nothing else |
47 | | - --> $DIR/invalid_dispatch_from_dyn_impls.rs:49:1 |
| 47 | + --> $DIR/dispatch-from-dyn-invalid-impls.rs:64:1 |
48 | 48 | | |
49 | 49 | LL | / impl<T: ?Sized, U: ?Sized> DispatchFromDyn<OverAligned<U>> for OverAligned<T> |
50 | 50 | LL | | |
51 | | -LL | | where |
52 | | -LL | | T: Unsize<U>, |
53 | | - | |_____________________^ |
| 51 | +LL | | where |
| 52 | +LL | | T: Unsize<U> |
| 53 | + | |________________^ |
54 | 54 | | |
55 | 55 | = note: extra field `1` of type `OverAlignedZst` is not allowed |
56 | 56 |
|
|
0 commit comments