2020-09-02 15:40:56 +08:00
|
|
|
error[E0277]: the trait bound `Bar: Eq` is not satisfied
|
2022-08-16 14:27:22 +08:00
|
|
|
--> $DIR/where-clauses-method-unsatisfied.rs:18:7
|
2018-08-08 20:28:26 +08:00
|
|
|
|
|
|
|
|
LL | x.equals(&x);
|
2022-08-16 14:27:22 +08:00
|
|
|
| ^^^^^^ the trait `Eq` is not implemented for `Bar`
|
2021-10-06 07:04:09 +08:00
|
|
|
|
|
|
|
|
note: required by a bound in `Foo::<T>::equals`
|
|
|
|
--> $DIR/where-clauses-method-unsatisfied.rs:11:52
|
|
|
|
|
|
|
|
|
LL | fn equals(&self, u: &Foo<T>) -> bool where T : Eq {
|
|
|
|
| ^^ required by this bound in `Foo::<T>::equals`
|
2022-03-31 22:58:45 +08:00
|
|
|
help: consider annotating `Bar` with `#[derive(Eq)]`
|
|
|
|
|
|
2023-03-18 10:18:39 +08:00
|
|
|
LL + #[derive(Eq)]
|
|
|
|
LL | struct Bar; // does not implement Eq
|
2022-03-31 22:58:45 +08:00
|
|
|
|
|
2018-08-08 20:28:26 +08:00
|
|
|
|
2023-11-21 23:44:16 +08:00
|
|
|
error: aborting due to 1 previous error
|
2018-08-08 20:28:26 +08:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|