20 lines
835 B
Text
20 lines
835 B
Text
error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
|
|
--> $DIR/call-const-trait-method-pass.rs:15:12
|
|
|
|
|
LL | impl const PartialEq for Int {
|
|
| ^^^^^^^^^ this trait is not `const`
|
|
|
|
|
= note: marking a trait with `#[const_trait]` ensures all default method bodies are `const`
|
|
= note: adding a non-const method body in the future would be a breaking change
|
|
|
|
error[E0015]: cannot call non-const method `<Int as PartialEq>::eq` in constant functions
|
|
--> $DIR/call-const-trait-method-pass.rs:20:15
|
|
|
|
|
LL | !self.eq(other)
|
|
| ^^^^^^^^^
|
|
|
|
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0015`.
|