2018-08-08 07:28:26 -05:00
|
|
|
error[E0277]: the trait bound `u32: Trait` is not satisfied
|
2020-01-18 16:57:56 -06:00
|
|
|
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:13:15
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-08-24 16:44:43 -05:00
|
|
|
LL | struct Foo<T:Trait> {
|
2020-04-06 00:15:06 -05:00
|
|
|
| ----- required by this bound in `Foo`
|
2019-08-24 16:44:43 -05:00
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | fn explode(x: Foo<u32>) {}
|
2020-01-18 16:57:56 -06:00
|
|
|
| ^^^^^^^^ 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
|
2020-01-18 16:57:56 -06:00
|
|
|
--> $DIR/trait-bounds-on-structs-and-enums-in-fns.rs:16:14
|
2018-08-08 07:28:26 -05:00
|
|
|
|
|
2019-08-24 16:44:43 -05:00
|
|
|
LL | enum Bar<T:Trait> {
|
2020-04-06 00:15:06 -05:00
|
|
|
| ----- required by this bound in `Bar`
|
2019-08-24 16:44:43 -05:00
|
|
|
...
|
2018-08-08 07:28:26 -05:00
|
|
|
LL | fn kaboom(y: Bar<f32>) {}
|
2020-01-18 16:57:56 -06:00
|
|
|
| ^^^^^^^^ 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`.
|