rust/src/test/ui/traits/trait-bounds-on-structs-and-enums-in-fns.stderr

22 lines
746 B
Plaintext
Raw Normal View History

2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `u32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:13:15
2018-08-08 07:28:26 -05:00
|
LL | struct Foo<T:Trait> {
2020-04-06 00:15:06 -05:00
| ----- required by this bound in `Foo`
...
2018-08-08 07:28:26 -05:00
LL | fn explode(x: Foo<u32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `u32`
2018-08-08 07:28:26 -05:00
error[E0277]: the trait bound `f32: Trait` is not satisfied
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:16:14
2018-08-08 07:28:26 -05:00
|
LL | enum Bar<T:Trait> {
2020-04-06 00:15:06 -05:00
| ----- required by this bound in `Bar`
...
2018-08-08 07:28:26 -05:00
LL | fn kaboom(y: Bar<f32>) {}
| ^^^^^^^^ the trait `Trait` is not implemented for `f32`
2018-08-08 07:28:26 -05:00
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0277`.