rust/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr
2024-11-03 18:59:31 +00:00

35 lines
1.4 KiB
Plaintext

error: const `impl` for trait `PartialEq` which is not marked with `#[const_trait]`
--> $DIR/derive-const-with-params.rs:7:16
|
LL | #[derive_const(PartialEq)]
| ^^^^^^^^^
|
= 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
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error: `~const` can only be applied to `#[const_trait]` traits
error[E0015]: cannot call non-const operator in constant functions
--> $DIR/derive-const-with-params.rs:8:23
|
LL | #[derive_const(PartialEq)]
| --------- in this derive macro expansion
LL | pub struct Reverse<T>(T);
| ^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
= note: this error originates in the derive macro `PartialEq` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0015]: cannot call non-const operator in constant functions
--> $DIR/derive-const-with-params.rs:11:5
|
LL | a == b
| ^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
error: aborting due to 4 previous errors
For more information about this error, try `rustc --explain E0015`.