2018-08-08 12:28:26 +00:00
|
|
|
error[E0277]: the trait bound `Struct: Trait<isize>` is not satisfied
|
2021-02-08 22:15:45 +00:00
|
|
|
--> $DIR/coercion-generic-bad.rs:16:36
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2019-05-28 18:46:13 +00:00
|
|
|
LL | let s: Box<dyn Trait<isize>> = Box::new(Struct { person: "Fred" });
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Trait<isize>` is not implemented for `Struct`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
2021-12-13 20:56:40 +00:00
|
|
|
= help: the trait `Trait<&'static str>` is implemented for `Struct`
|
2023-09-10 03:33:07 +00:00
|
|
|
= help: for that trait implementation, expected `&'static str`, found `isize`
|
2023-05-11 02:10:56 +00:00
|
|
|
= note: required for the cast from `Box<Struct>` to `Box<dyn Trait<isize>>`
|
2018-08-08 12:28:26 +00:00
|
|
|
|
2023-11-21 15:44:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 12:28:26 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|