Files
rust/tests/ui/traits/const-traits/call-const-trait-method-pass.stderr

21 lines
835 B
Plaintext
Raw Normal View History

2024-06-25 09:50:01 +00:00
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`
2024-06-25 09:50:01 +00:00
|
= 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
2024-12-23 21:49:48 +00:00
error[E0015]: cannot call non-const method `<Int as PartialEq>::eq` in constant functions
2024-06-25 09:50:01 +00:00
--> $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
2024-11-20 17:04:14 +08:00
error: aborting due to 2 previous errors
2023-04-16 11:12:37 +00:00
For more information about this error, try `rustc --explain E0015`.