rust/tests/ui/traits/const-traits/generic-bound.stderr

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

21 lines
744 B
Plaintext
Raw Normal View History

2024-06-25 09:50:01 +00:00
error: const `impl` for trait `Add` which is not marked with `#[const_trait]`
--> $DIR/generic-bound.rs:16:15
|
LL | impl<T> const std::ops::Add for S<T> {
| ^^^^^^^^^^^^^
|
= 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
2023-08-06 13:20:55 +00:00
error[E0015]: cannot call non-const operator in constant functions
--> $DIR/generic-bound.rs:25:5
2023-04-16 11:12:37 +00:00
|
2023-08-06 13:20:55 +00:00
LL | arg + arg
| ^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
2023-04-16 11:12:37 +00:00
2024-06-25 09:50:01 +00:00
error: aborting due to 2 previous errors
2023-04-16 11:12:37 +00:00
2023-08-06 13:20:55 +00:00
For more information about this error, try `rustc --explain E0015`.