fork/rust

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

borsAuto merge of #71868 - Mark-Simulacrum:stable-1.43.1, r=pietroalbini8d69840ab92

1.43.1
2.6 KiB84 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   |
10help: consider restricting this type parameter with `T: Trait`
11  --> $DIR/trait-bounds-on-structs-and-enums.rs:13:6
12   |
13LL | impl<T> Foo<T> {
14   |      ^
15
16error[E0277]: the trait bound `isize: Trait` is not satisfied
17  --> $DIR/trait-bounds-on-structs-and-enums.rs:19:5
18   |
19LL | struct Foo<T:Trait> {
20   | ------------------- required by `Foo`
21...
22LL |     a: Foo<isize>,
23   |     ^^^^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
24
25error[E0277]: the trait bound `usize: Trait` is not satisfied
26  --> $DIR/trait-bounds-on-structs-and-enums.rs:23:10
27   |
28LL | enum Bar<T:Trait> {
29   | ----------------- required by `Bar`
30...
31LL |     Quux(Bar<usize>),
32   |          ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
33
34error[E0277]: the trait bound `U: Trait` is not satisfied
35  --> $DIR/trait-bounds-on-structs-and-enums.rs:27:5
36   |
37LL | struct Foo<T:Trait> {
38   | ------------------- required by `Foo`
39...
40LL |     b: Foo<U>,
41   |     ^^^^^^^^^ the trait `Trait` is not implemented for `U`
42   |
43help: consider restricting this type parameter with `U: Trait`
44  --> $DIR/trait-bounds-on-structs-and-enums.rs:26:16
45   |
46LL | struct Badness<U> {
47   |                ^
48
49error[E0277]: the trait bound `V: Trait` is not satisfied
50  --> $DIR/trait-bounds-on-structs-and-enums.rs:31:21
51   |
52LL | enum Bar<T:Trait> {
53   | ----------------- required by `Bar`
54...
55LL |     EvenMoreBadness(Bar<V>),
56   |                     ^^^^^^ the trait `Trait` is not implemented for `V`
57   |
58help: consider restricting this type parameter with `V: Trait`
59  --> $DIR/trait-bounds-on-structs-and-enums.rs:30:18
60   |
61LL | enum MoreBadness<V> {
62   |                  ^
63
64error[E0277]: the trait bound `i32: Trait` is not satisfied
65  --> $DIR/trait-bounds-on-structs-and-enums.rs:35:5
66   |
67LL | struct Foo<T:Trait> {
68   | ------------------- required by `Foo`
69...
70LL |     Foo<i32>,
71   |     ^^^^^^^^ the trait `Trait` is not implemented for `i32`
72
73error[E0277]: the trait bound `u8: Trait` is not satisfied
74  --> $DIR/trait-bounds-on-structs-and-enums.rs:39:22
75   |
76LL | enum Bar<T:Trait> {
77   | ----------------- required by `Bar`
78...
79LL |     DictionaryLike { field: Bar<u8> },
80   |                      ^^^^^^^^^^^^^^ the trait `Trait` is not implemented for `u8`
81
82error: aborting due to 7 previous errors
83
84For more information about this error, try `rustc --explain E0277`.