]>
Commit | Line | Data |
---|---|---|
8faf50e0 | 1 | error[E0277]: can't compare `&T` with `T` |
0731742a | 2 | --> $DIR/partialeq_help.rs:2:7 |
ff7c6d11 | 3 | | |
532ac7d7 | 4 | LL | a == b; |
8faf50e0 | 5 | | ^^ no implementation for `&T == T` |
ff7c6d11 | 6 | | |
1b1a35ee | 7 | = help: the trait `PartialEq<T>` is not implemented for `&T` |
6a06907d XL |
8 | help: consider introducing a `where` bound, but there might be an alternative better way to express this requirement |
9 | | | |
10 | LL | fn foo<T: PartialEq>(a: &T, b: T) where &T: PartialEq<T> { | |
11 | | ^^^^^^^^^^^^^^^^^^^^^^ | |
ff7c6d11 XL |
12 | |
13 | error: aborting due to previous error | |
14 | ||
0531ce1d | 15 | For more information about this error, try `rustc --explain E0277`. |