2022-02-06 00:44:41 -06:00
|
|
|
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);
|
2024-01-26 14:34:29 -06:00
|
|
|
| ------------ doesn't satisfy `Value: Eq`, `Value: Hash` or `Value: PartialEq`
|
2022-02-06 00:44:41 -06:00
|
|
|
...
|
|
|
|
LL | hs.insert(Value(0));
|
2022-03-14 16:07:19 -05:00
|
|
|
| ^^^^^^
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
|
|
|
= note: the following trait bounds were not satisfied:
|
|
|
|
`Value: Eq`
|
2023-01-12 13:53:01 -06:00
|
|
|
`Value: PartialEq`
|
|
|
|
which is required by `Value: Eq`
|
2022-02-06 00:44:41 -06:00
|
|
|
`Value: Hash`
|
|
|
|
help: consider annotating `Value` with `#[derive(Eq, Hash, PartialEq)]`
|
|
|
|
|
|
2023-03-17 21:18:39 -05:00
|
|
|
LL + #[derive(Eq, Hash, PartialEq)]
|
|
|
|
LL | struct Value(u32);
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
2024-01-26 14:34:29 -06:00
|
|
|
| -------------------- doesn't satisfy `NoDerives: Eq` or `NoDerives: PartialEq`
|
2022-06-08 13:07:59 -05:00
|
|
|
LL |
|
2022-02-06 00:44:41 -06:00
|
|
|
LL | struct Object<T>(T);
|
2022-07-01 18:47:26 -05:00
|
|
|
| ---------------- method `use_eq` not found for this struct
|
2022-02-06 00:44:41 -06:00
|
|
|
...
|
|
|
|
LL | foo.use_eq();
|
|
|
|
| ^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
|
|
|
|
|
|
2023-01-12 15:32:06 -06:00
|
|
|
note: trait bound `NoDerives: Eq` was not satisfied
|
2023-01-10 21:07:14 -06:00
|
|
|
--> $DIR/issue-91550.rs:15:9
|
|
|
|
|
|
|
|
|
LL | impl<T: Eq> Object<T> {
|
|
|
|
| ^^ ---------
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2023-01-12 15:32:06 -06:00
|
|
|
= note: the following trait bounds were not satisfied:
|
|
|
|
`NoDerives: PartialEq`
|
|
|
|
which is required by `NoDerives: Eq`
|
2022-02-06 00:44:41 -06:00
|
|
|
help: consider annotating `NoDerives` with `#[derive(Eq, PartialEq)]`
|
|
|
|
|
|
2023-03-17 21:18:39 -05:00
|
|
|
LL + #[derive(Eq, PartialEq)]
|
|
|
|
LL | pub struct NoDerives;
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
2024-01-26 14:34:29 -06:00
|
|
|
| -------------------- doesn't satisfy `NoDerives: Eq`, `NoDerives: Ord`, `NoDerives: PartialEq` or `NoDerives: PartialOrd`
|
2022-06-08 13:07:59 -05:00
|
|
|
LL |
|
2022-02-06 00:44:41 -06:00
|
|
|
LL | struct Object<T>(T);
|
2022-07-01 18:47:26 -05:00
|
|
|
| ---------------- method `use_ord` not found for this struct
|
2022-02-06 00:44:41 -06:00
|
|
|
...
|
|
|
|
LL | foo.use_ord();
|
|
|
|
| ^^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
|
|
|
|
|
|
2023-01-12 15:32:06 -06:00
|
|
|
note: trait bound `NoDerives: Ord` was not satisfied
|
2023-01-10 21:07:14 -06:00
|
|
|
--> $DIR/issue-91550.rs:18:9
|
|
|
|
|
|
|
|
|
LL | impl<T: Ord> Object<T> {
|
|
|
|
| ^^^ ---------
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2023-01-12 15:32:06 -06:00
|
|
|
= 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`
|
2022-02-12 00:43:21 -06:00
|
|
|
help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]`
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
2023-03-17 21:18:39 -05:00
|
|
|
LL + #[derive(Eq, Ord, PartialEq, PartialOrd)]
|
|
|
|
LL | pub struct NoDerives;
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
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;
|
2024-01-26 14:34:29 -06:00
|
|
|
| -------------------- doesn't satisfy `NoDerives: Eq`, `NoDerives: Ord`, `NoDerives: PartialEq` or `NoDerives: PartialOrd`
|
2022-06-08 13:07:59 -05:00
|
|
|
LL |
|
2022-02-06 00:44:41 -06:00
|
|
|
LL | struct Object<T>(T);
|
2022-07-01 18:47:26 -05:00
|
|
|
| ---------------- method `use_ord_and_partial_ord` not found for this struct
|
2022-02-06 00:44:41 -06:00
|
|
|
...
|
|
|
|
LL | foo.use_ord_and_partial_ord();
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `Object<NoDerives>` due to unsatisfied trait bounds
|
|
|
|
|
|
2023-01-10 22:11:06 -06:00
|
|
|
note: the following trait bounds were not satisfied:
|
|
|
|
`NoDerives: Ord`
|
|
|
|
`NoDerives: PartialOrd`
|
2023-01-10 21:07:14 -06:00
|
|
|
--> $DIR/issue-91550.rs:21:9
|
|
|
|
|
|
|
|
|
LL | impl<T: Ord + PartialOrd> Object<T> {
|
2023-01-10 22:11:06 -06:00
|
|
|
| ^^^ ^^^^^^^^^^ ---------
|
|
|
|
| | |
|
|
|
|
| | unsatisfied trait bound introduced here
|
2023-01-10 21:07:14 -06:00
|
|
|
| unsatisfied trait bound introduced here
|
2023-01-12 15:32:06 -06:00
|
|
|
= 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`
|
2022-02-12 00:43:21 -06:00
|
|
|
help: consider annotating `NoDerives` with `#[derive(Eq, Ord, PartialEq, PartialOrd)]`
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
2023-03-17 21:18:39 -05:00
|
|
|
LL + #[derive(Eq, Ord, PartialEq, PartialOrd)]
|
|
|
|
LL | pub struct NoDerives;
|
2022-02-06 00:44:41 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
error: aborting due to 4 previous errors
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0599`.
|