fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #66089 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum4560ea788cb

1.39.0
2.3 KiB72 linesraw
1error[E0277]: the trait bound `T: Trait` is not satisfied
2  --> $DIR/trait-bounds-on-structs-and-enums.rs:13:9
3   |
4LL | struct Foo<T:Trait> {
5   | ------------------- required by `Foo`
6...
7LL | impl<T> Foo<T> {
8   |         ^^^^^^ the trait `Trait` is not implemented for `T`
9   |
10   = help: consider adding a `where T: Trait` bound
11
12error[E0277]: the trait bound `isize: Trait` is not satisfied
13  --> $DIR/trait-bounds-on-structs-and-enums.rs:19:5
14   |
15LL | struct Foo<T:Trait> {
16   | ------------------- required by `Foo`
17...
18LL |     a: Foo<isize>,
19   |     ^^^^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
20
21error[E0277]: the trait bound `usize: Trait` is not satisfied
22  --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10
23   |
24LL | enum Bar<T:Trait> {
25   | ----------------- required by `Bar`
26...
27LL |     Quux(Bar<usize>),
28   |          ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
29
30error[E0277]: the trait bound `U: Trait` is not satisfied
31  --> $DIR/trait-bounds-on-structs-and-enums.rs:27:5
32   |
33LL | struct Foo<T:Trait> {
34   | ------------------- required by `Foo`
35...
36LL |     b: Foo<U>,
37   |     ^^^^^^^^^ the trait `Trait` is not implemented for `U`
38   |
39   = help: consider adding a `where U: Trait` bound
40
41error[E0277]: the trait bound `V: Trait` is not satisfied
42  --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21
43   |
44LL | enum Bar<T:Trait> {
45   | ----------------- required by `Bar`
46...
47LL |     EvenMoreBadness(Bar<V>),
48   |                     ^^^^^^ the trait `Trait` is not implemented for `V`
49   |
50   = help: consider adding a `where V: Trait` bound
51
52error[E0277]: the trait bound `i32: Trait` is not satisfied
53  --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5
54   |
55LL | struct Foo<T:Trait> {
56   | ------------------- required by `Foo`
57...
58LL |     Foo<i32>,
59   |     ^^^^^^^^ the trait `Trait` is not implemented for `i32`
60
61error[E0277]: the trait bound `u8: Trait` is not satisfied
62  --> $DIR/trait-bounds-on-structs-and-enums.rs:39:22
63   |
64LL | enum Bar<T:Trait> {
65   | ----------------- required by `Bar`
66...
67LL |     DictionaryLike { field: Bar<u8> },
68   |                      ^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
69
70error: aborting due to 7 previous errors
71
72For more information about this error, try `rustc --explain E0277`.