]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rfc-2632-const-trait-impl/call-generic-method-fail.stderr
Merge commit 'd0cf3481a84e3aa68c2f185c460e282af36ebc42' into clippyup
[rust.git] / src / test / ui / rfc-2632-const-trait-impl / call-generic-method-fail.stderr
1 error[E0277]: can't compare `T` with `T` in const contexts
2   --> $DIR/call-generic-method-fail.rs:4:5
3    |
4 LL |     *t == *t
5    |     ^^^^^^^^ no implementation for `T == T`
6    |
7 note: the trait `PartialEq` is implemented for `T`, but that implementation is not `const`
8   --> $DIR/call-generic-method-fail.rs:4:5
9    |
10 LL |     *t == *t
11    |     ^^^^^^^^
12
13 error[E0015]: cannot call non-const operator in constant functions
14   --> $DIR/call-generic-method-fail.rs:4:5
15    |
16 LL |     *t == *t
17    |     ^^^^^^^^
18    |
19    = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
20 help: consider further restricting this bound
21    |
22 LL | pub const fn equals_self<T: PartialEq + ~const std::cmp::PartialEq>(t: &T) -> bool {
23    |                                       ++++++++++++++++++++++++++++
24
25 error: aborting due to 2 previous errors
26
27 Some errors have detailed explanations: E0015, E0277.
28 For more information about an error, try `rustc --explain E0015`.