Files
rust/tests/ui/traits/const-traits/const_derives/derive-const-with-params.stderr

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

36 lines
1.3 KiB
Plaintext
Raw Normal View History

2024-06-21 11:57:24 +00:00
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)]
| ^^^^^^^^^ this trait is not `const`
2024-06-21 11:57:24 +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
error: `~const` can only be applied to `#[const_trait]` traits
|
note: `PartialEq` can't be used with `~const` because it isn't annotated with `#[const_trait]`
--> $SRC_DIR/core/src/cmp.rs:LL:COL
2024-06-21 11:57:24 +00:00
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
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
2024-10-30 18:03:44 +00:00
error: aborting due to 4 previous errors
2024-06-21 11:57:24 +00:00
For more information about this error, try `rustc --explain E0015`.