1 error[E0378]: the trait `CoerceSized` may only be implemented for structs containing the field being coerced, `PhantomData` fields, and nothing else
2 --> $DIR/invalid_coerce_sized_impls.rs:25:1
4 LL | / impl<T, U> CoerceSized<WrapperWithExtraField<T>> for WrapperWithExtraField<U>
6 LL | | T: CoerceUnsized<U>,
7 LL | | U: CoerceSized<T>,
8 LL | | {} //~^^^^ ERROR [E0378]
11 = note: extra field `1` of type `i32` is not allowed
13 error[E0378]: implementing the `CoerceSized` trait requires multiple coercions
14 --> $DIR/invalid_coerce_sized_impls.rs:39:1
16 LL | / impl<T: ?Sized, U: ?Sized> CoerceSized<MultiplePointers<T>> for MultiplePointers<U>
19 LL | | {} //~^^^ ERROR [E0378]
22 = note: the trait `CoerceSized` may only be implemented for a coercion between structures with a single field being coerced
23 = note: currently, 2 fields need coercions: ptr1 (*const U to *const T), ptr2 (*const U to *const T)
25 error[E0378]: the trait `CoerceSized` may only be implemented for a coercion between structures with a single field being coerced, none found
26 --> $DIR/invalid_coerce_sized_impls.rs:51:1
28 LL | impl<T: ?Sized, U: ?Sized> CoerceSized<NothingToCoerce<U>> for NothingToCoerce<T> {}
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31 error: aborting due to 3 previous errors
33 For more information about this error, try `rustc --explain E0378`.