error[E0277]: can't compare `S` with `S` in const contexts --> $DIR/call-generic-method-nonconst.rs:18:34 | LL | pub const EQ: bool = equals_self(&S); | ----------- ^^ no implementation for `S == S` | | | required by a bound introduced by this call | = help: the trait `~const PartialEq` is not implemented for `S` note: the trait `PartialEq` is implemented for `S`, but that implementation is not `const` --> $DIR/call-generic-method-nonconst.rs:18:34 | LL | pub const EQ: bool = equals_self(&S); | ^^ note: required by a bound in `equals_self` --> $DIR/call-generic-method-nonconst.rs:11:25 | LL | const fn equals_self(t: &T) -> bool { | ^^^^^^^^^^^^^^^^ required by this bound in `equals_self` help: consider annotating `S` with `#[derive(PartialEq)]` | LL | #[derive(PartialEq)] | error: aborting due to previous error For more information about this error, try `rustc --explain E0277`.