]> git.lizzy.rs Git - rust.git/blob - src/test/ui/traits/bound/on-structs-and-enums.stderr
Auto merge of #84959 - camsteffen:lint-suggest-group, r=estebank
[rust.git] / src / test / ui / traits / bound / on-structs-and-enums.stderr
1 error[E0277]: the trait bound `T: Trait` is not satisfied
2   --> $DIR/on-structs-and-enums.rs:13:9
3    |
4 LL | struct Foo<T:Trait> {
5    |              ----- required by this bound in `Foo`
6 ...
7 LL | impl<T> Foo<T> {
8    |         ^^^^^^ the trait `Trait` is not implemented for `T`
9    |
10 help: consider restricting type parameter `T`
11    |
12 LL | impl<T: Trait> Foo<T> {
13    |       ^^^^^^^
14
15 error[E0277]: the trait bound `isize: Trait` is not satisfied
16   --> $DIR/on-structs-and-enums.rs:19:8
17    |
18 LL | struct Foo<T:Trait> {
19    |              ----- required by this bound in `Foo`
20 ...
21 LL |     a: Foo<isize>,
22    |        ^^^^^^^^^^ the trait `Trait` is not implemented for `isize`
23
24 error[E0277]: the trait bound `usize: Trait` is not satisfied
25   --> $DIR/on-structs-and-enums.rs:23:10
26    |
27 LL | enum Bar<T:Trait> {
28    |            ----- required by this bound in `Bar`
29 ...
30 LL |     Quux(Bar<usize>),
31    |          ^^^^^^^^^^ the trait `Trait` is not implemented for `usize`
32
33 error[E0277]: the trait bound `U: Trait` is not satisfied
34   --> $DIR/on-structs-and-enums.rs:27:8
35    |
36 LL | struct Foo<T:Trait> {
37    |              ----- required by this bound in `Foo`
38 ...
39 LL |     b: Foo<U>,
40    |        ^^^^^^ the trait `Trait` is not implemented for `U`
41    |
42 help: consider restricting type parameter `U`
43    |
44 LL | struct Badness<U: Trait> {
45    |                 ^^^^^^^
46
47 error[E0277]: the trait bound `V: Trait` is not satisfied
48   --> $DIR/on-structs-and-enums.rs:31:21
49    |
50 LL | enum Bar<T:Trait> {
51    |            ----- required by this bound in `Bar`
52 ...
53 LL |     EvenMoreBadness(Bar<V>),
54    |                     ^^^^^^ the trait `Trait` is not implemented for `V`
55    |
56 help: consider restricting type parameter `V`
57    |
58 LL | enum MoreBadness<V: Trait> {
59    |                   ^^^^^^^
60
61 error[E0277]: the trait bound `i32: Trait` is not satisfied
62   --> $DIR/on-structs-and-enums.rs:35:5
63    |
64 LL | struct Foo<T:Trait> {
65    |              ----- required by this bound in `Foo`
66 ...
67 LL |     Foo<i32>,
68    |     ^^^^^^^^ the trait `Trait` is not implemented for `i32`
69
70 error[E0277]: the trait bound `u8: Trait` is not satisfied
71   --> $DIR/on-structs-and-enums.rs:39:29
72    |
73 LL | enum Bar<T:Trait> {
74    |            ----- required by this bound in `Bar`
75 ...
76 LL |     DictionaryLike { field: Bar<u8> },
77    |                             ^^^^^^^ the trait `Trait` is not implemented for `u8`
78
79 error: aborting due to 7 previous errors
80
81 For more information about this error, try `rustc --explain E0277`.