rust/tests/ui/where-clauses/where-clauses-method-unsati...

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
709 B
Plaintext
Raw Normal View History

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`
|
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
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`.