rust/tests/ui/error-codes/E0374.stderr

22 lines
738 B
Plaintext

error[E0374]: the trait `CoerceUnsized` may only be implemented for a coercion between structures
--> $DIR/E0374.rs:8:1
|
LL | / impl<T, U> CoerceUnsized<Foo<U>> for Foo<T>
LL | | where T: CoerceUnsized<U> {}
| |_____________________________^
|
= note: expected a single field to be coerced, none found
error[E0392]: type parameter `T` is never used
--> $DIR/E0374.rs:4:12
|
LL | struct Foo<T: ?Sized> {
| ^ unused type parameter
|
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
error: aborting due to 2 previous errors
Some errors have detailed explanations: E0374, E0392.
For more information about an error, try `rustc --explain E0374`.