]> git.lizzy.rs Git - rust.git/blob - tests/ui/partialeq_help.stderr
Rollup merge of #106570 - Xaeroxe:div-duration-tests, r=JohnTitor
[rust.git] / tests / ui / partialeq_help.stderr
1 error[E0277]: can't compare `&T` with `T`
2   --> $DIR/partialeq_help.rs:2:7
3    |
4 LL |     a == b;
5    |       ^^ no implementation for `&T == T`
6    |
7    = help: the trait `PartialEq<T>` is not implemented for `&T`
8 help: consider introducing a `where` clause, 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    |                                   ++++++++++++++++++++++
12
13 error[E0277]: can't compare `&T` with `T`
14   --> $DIR/partialeq_help.rs:6:7
15    |
16 LL |     a == b;
17    |       ^^ no implementation for `&T == T`
18    |
19    = help: the trait `PartialEq<T>` is not implemented for `&T`
20 help: consider extending the `where` clause, but there might be an alternative better way to express this requirement
21    |
22 LL | fn foo2<T: PartialEq>(a: &T, b: T) where &T: PartialEq<T> {
23    |                                          ++++++++++++++++
24
25 error: aborting due to 2 previous errors
26
27 For more information about this error, try `rustc --explain E0277`.