fork/rust

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

borsAuto merge of #69444 - pietroalbini:stable-next-final-v2-new, r=pietroalbinif3e1a954d2e

1.41.1
2.4 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 restricting this bound: `T: Trait`
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 | struct Badness<U> {
37   |                - help: consider restricting this bound: `U: Trait`
38LL |     b: Foo<U>,
39   |     ^^^^^^^^^ the trait `Trait` is not implemented for `U`
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 | enum MoreBadness<V> {
48   |                  - help: consider restricting this bound: `V: Trait`
49LL |     EvenMoreBadness(Bar<V>),
50   |                     ^^^^^^ the trait `Trait` is not implemented for `V`
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`.