rust/tests/ui/const-generics/defaults/trait_objects_fail.stderr

22 lines
766 B
Plaintext
Raw Normal View History

2021-10-20 16:56:42 -05:00
error[E0277]: the trait bound `u32: Trait` is not satisfied
2021-10-23 10:57:49 -05:00
--> $DIR/trait_objects_fail.rs:26:9
2021-10-20 16:56:42 -05:00
|
LL | foo(&10_u32);
2022-08-16 01:27:22 -05:00
| ^^^^^^^ the trait `Trait` is not implemented for `u32`
2021-10-20 16:56:42 -05:00
|
= help: the trait `Trait<2>` is implemented for `u32`
2023-05-10 21:10:56 -05:00
= note: required for the cast from `&u32` to `&dyn Trait`
2021-10-20 16:56:42 -05:00
error[E0277]: the trait bound `bool: Traitor<_>` is not satisfied
2021-10-23 10:57:49 -05:00
--> $DIR/trait_objects_fail.rs:28:9
2021-10-20 16:56:42 -05:00
|
LL | bar(&true);
2022-08-16 01:27:22 -05:00
| ^^^^^ the trait `Traitor<_>` is not implemented for `bool`
2021-10-20 16:56:42 -05:00
|
= help: the trait `Traitor<2, 3>` is implemented for `bool`
2023-05-10 21:10:56 -05:00
= note: required for the cast from `&bool` to `&dyn Traitor<_>`
2021-10-20 16:56:42 -05:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.