Files
rust/tests/ui/where-clauses/where-clauses-method-unsatisfied.current.stderr

24 lines
756 B
Plaintext
Raw Normal View History

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