Closed
Description
Given the following code: Link to Playground
struct Foo;
fn main() {
let _ = Some(Foo) == Some(Foo);
}
The current output is:
error[E0369]: binary operation `==` cannot be applied to type `Option<Foo>`
--> src/main.rs:4:23
|
4 | let _ = Some(Foo) == Some(Foo);
| --------- ^^ --------- Option<Foo>
| |
| Option<Foo>
Ideally the output should look like:
error[E0369]: binary operation `==` cannot be applied to type `Option<Foo>`
--> src/main.rs:4:23
|
4 | let _ = Some(Foo) == Some(Foo);
| --------- ^^ --------- Option<Foo>
| |
| Option<Foo>
|
= note: an implementation of `std::cmp::PartialEq<Option<Foo>>` is found for `Option<Foo>`
but the trait bounds were not satisfied:
`Foo: PartialEq<Foo>`
= note: an implementation of `std::cmp::PartialEq` might be missing for `Foo`