rust/src/test/ui/rfc-2632-const-trait-impl/call-generic-method-nonconst.stderr

17 lines
616 B
Plaintext
Raw Normal View History

2021-07-26 04:06:55 +00:00
error[E0277]: can't compare `S` with `S`
--> $DIR/call-generic-method-nonconst.rs:19:34
|
LL | pub const EQ: bool = equals_self(&S);
| ^^ no implementation for `S == S`
|
= help: the trait `PartialEq` is not implemented for `S`
note: required by a bound in `equals_self`
--> $DIR/call-generic-method-nonconst.rs:12:25
|
LL | const fn equals_self<T: 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`.