blob: 5b564ec22fcb85f0f12e24ce77f7707c5f281db4 [file] [log] [blame] [view]
#### Note: this error code is no longer emitted by the compiler.
`CoerceUnsized` or `DispatchFromDyn` was implemented between two types that
are not structs.
Erroneous code example:
```compile_fail,E0377
#![feature(coerce_unsized)]
use std::ops::CoerceUnsized;
struct Foo<T: ?Sized> {
a: T,
}
// error: The type `U` is not a struct
impl<T, U> CoerceUnsized<U> for Foo<T> {}
```
`CoerceUnsized` or `DispatchFromDyn` can only be implemented between structs.