summaryrefslogtreecommitdiffstats
path: root/tests/ui/derives/issue-91550.stderr
blob: 1324b80b5fcdb901b6685074f0eaa070c6e8282d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
error[E0599]: the method `insert` exists for struct `HashSet<Value>`, but its trait bounds were not satisfied
  --> $DIR/issue-91550.rs:8:8
   |
LL | struct Value(u32);
   | ------------
   | |
   | doesn't satisfy `Value: Eq`
   | doesn't satisfy `Value: Hash`
   | doesn't satisfy `Value: PartialEq`
...
LL |     hs.insert(Value(0));
   |        ^^^^^^
   |
   = note: the following trait bounds were not satisfied:
           `Value: Eq`
           `Value: PartialEq`
           which is required by `Value: Eq`
           `Value: Hash`
help: consider annotating `Value` with `#[derive(Eq, Hash, PartialEq)]`
   |
LL + #[derive(Eq, Hash, PartialEq)]
LL | struct Value(u32);
   |

error[E0599]: the method `use_eq` exists for struct `Object<NoDerives>`, but its trait bounds were not satisfied
  --> $DIR/issue-91550.rs:26:9
   |
LL | pub struct NoDerives;
   | --------------------
   | |
   | doesn't satisfy `NoDerives: Eq`
   | doesn't satisfy `NoDerives: PartialEq`
LL |
LL | struct Object<T>(T);
   | ---------------- method `use_eq` not found for this struct
...
LL |     foo.use_eq();
   |         ^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
   |
note: trait bound `NoDerives: Eq` was not satisfied
  --> $DIR/issue-91550.rs:15:9
   |
LL | impl<T: Eq> Object<T> {
   |         ^^  ---------
   |         |
   |         unsatisfied trait bound introduced here
   = note: the following trait bounds were not satisfied:
           `NoDerives: PartialEq`
           which is required by `NoDerives: Eq`
help: consider annotating `NoDerives` with `#[derive(Eq, PartialEq)]`
   |
LL + #[derive(Eq, PartialEq)]
LL | pub struct NoDerives;
   |

error[E0599]: the method `use_ord` exists for struct `Object<NoDerives>`, but its trait bounds were not satisfied
  --> $DIR/issue-91550.rs:27:9
   |
LL | pub struct NoDerives;
   | --------------------
   | |
   | doesn't satisfy `NoDerives: Eq`
   | doesn't satisfy `NoDerives: Ord`
   | doesn't satisfy `NoDerives: PartialEq`
   | doesn't satisfy `NoDerives: PartialOrd`
LL |
LL | struct Object<T>(T);
   | ---------------- method `use_ord` not found for this struct
...
LL |     foo.use_ord();
   |         ^^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
   |
note: trait bound `NoDerives: Ord` was not satisfied
  --> $DIR/issue-91550.rs:18:9
   |
LL | impl<T: Ord> Object<T> {
   |         ^^^  ---------
   |         |
   |         unsatisfied trait bound introduced here
   = note: the following trait bounds were not satisfied:
           `NoDerives: PartialOrd`
           which is required by `NoDerives: Ord`
           `NoDerives: PartialEq`
           which is required by `NoDerives: Ord`
           `NoDerives: Eq`
           which is required by `NoDerives: Ord`
help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]`
   |
LL + #[derive(Eq, Ord, PartialEq, PartialOrd)]
LL | pub struct NoDerives;
   |

error[E0599]: the method `use_ord_and_partial_ord` exists for struct `Object<NoDerives>`, but its trait bounds were not satisfied
  --> $DIR/issue-91550.rs:28:9
   |
LL | pub struct NoDerives;
   | --------------------
   | |
   | doesn't satisfy `NoDerives: Eq`
   | doesn't satisfy `NoDerives: Ord`
   | doesn't satisfy `NoDerives: PartialEq`
   | doesn't satisfy `NoDerives: PartialOrd`
LL |
LL | struct Object<T>(T);
   | ---------------- method `use_ord_and_partial_ord` not found for this struct
...
LL |     foo.use_ord_and_partial_ord();
   |         ^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
   |
note: the following trait bounds were not satisfied:
      `NoDerives: Ord`
      `NoDerives: PartialOrd`
  --> $DIR/issue-91550.rs:21:9
   |
LL | impl<T: Ord + PartialOrd> Object<T> {
   |         ^^^   ^^^^^^^^^^  ---------
   |         |     |
   |         |     unsatisfied trait bound introduced here
   |         unsatisfied trait bound introduced here
   = note: the following trait bounds were not satisfied:
           `NoDerives: PartialEq`
           which is required by `NoDerives: Ord`
           `NoDerives: Eq`
           which is required by `NoDerives: Ord`
           `NoDerives: PartialEq`
           which is required by `NoDerives: PartialOrd`
help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]`
   |
LL + #[derive(Eq, Ord, PartialEq, PartialOrd)]
LL | pub struct NoDerives;
   |

error: aborting due to 4 previous errors

For more information about this error, try `rustc --explain E0599`.