2022-01-15 18:44:57 +00:00
|
|
|
error[E0277]: can't compare `S` with `S` in const contexts
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/call-generic-method-nonconst.rs:18:34
|
2021-07-26 04:06:55 +00:00
|
|
|
|
|
|
|
|
LL | pub const EQ: bool = equals_self(&S);
|
2021-09-07 11:30:53 +00:00
|
|
|
| ----------- ^^ no implementation for `S == S`
|
|
|
|
| |
|
|
|
|
| required by a bound introduced by this call
|
2021-07-26 04:06:55 +00:00
|
|
|
|
|
2021-12-24 14:50:44 +00:00
|
|
|
= help: the trait `~const PartialEq` is not implemented for `S`
|
2022-01-27 03:09:44 +00:00
|
|
|
note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const`
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/call-generic-method-nonconst.rs:18:34
|
2022-01-27 03:09:44 +00:00
|
|
|
|
|
|
|
|
LL | pub const EQ: bool = equals_self(&S);
|
|
|
|
| ^^
|
2021-07-31 16:26:55 +00:00
|
|
|
note: required by a bound in `equals_self`
|
2022-02-09 18:53:40 +00:00
|
|
|
--> $DIR/call-generic-method-nonconst.rs:11:25
|
2021-07-31 16:26:55 +00:00
|
|
|
|
|
2021-08-25 15:21:55 +00:00
|
|
|
LL | const fn equals_self<T: ~const PartialEq>(t: &T) -> bool {
|
|
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `equals_self`
|
2021-07-26 04:06:55 +00:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|