rust/tests/ui/traits/const-traits/generic-bound.stderr
Michael Goulet e91267f3f0 Move tests
2024-10-22 00:03:09 +00:00

25 lines
847 B
Plaintext

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
error[E0015]: cannot call non-const operator in constant functions
--> $DIR/generic-bound.rs:25:5
|
LL | arg + arg
| ^^^^^^^^^
|
= note: calls in constant functions are limited to constant functions, tuple structs and tuple variants
help: add `#![feature(effects)]` to the crate attributes to enable
|
LL + #![feature(effects)]
|
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0015`.