blob: 22e43e07dbda59aa0d9f16abc566fee508ed2e5c [file]
error[E0038]: the trait `Foo` is not dyn compatible
--> $DIR/issue-71659.rs:33:17
|
LL | let x: &dyn Foo = &[];
| ^^^ `Foo` is not dyn compatible
|
note: for a trait to be dyn compatible it needs to allow building a vtable
for more information, visit <https://doc.rust-lang.org/reference/items/traits.html#dyn-compatibility>
--> $SRC_DIR/core/src/marker.rs:LL:COL
|
= note: ...because it opted out of dyn-compatibility
|
::: $DIR/issue-71659.rs:29:11
|
LL | pub trait Foo: CastTo<[i32]> {}
| --- this trait is not dyn compatible...
= help: only type `[i32; 0]` implements `Foo` within this crate; consider using it directly instead.
= note: `Foo` may be implemented in other crates; if you want to support your users passing their own types here, you can't refer to a specific type
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0038`.