|
1 |
| -error: const `impl` for trait `FromResidual` which is not marked with `#[const_trait]` |
2 |
| - --> $DIR/const-try.rs:15:12 |
| 1 | +error[E0015]: `?` cannot determine the branch of `TryMe` in constant functions |
| 2 | + --> $DIR/const-try.rs:33:5 |
3 | 3 | |
|
4 |
| -LL | impl const FromResidual<Error> for TryMe { |
5 |
| - | ^^^^^^^^^^^^^^^^^^^ |
| 4 | +LL | TryMe?; |
| 5 | + | ^^^^^^ |
6 | 6 | |
|
7 |
| - = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
8 |
| - = note: adding a non-const method body in the future would be a breaking change |
9 |
| - |
10 |
| -error: const `impl` for trait `Try` which is not marked with `#[const_trait]` |
11 |
| - --> $DIR/const-try.rs:21:12 |
| 7 | +note: impl defined here, but it is not `const` |
| 8 | + --> $DIR/const-try.rs:21:1 |
12 | 9 | |
|
13 | 10 | LL | impl const Try for TryMe {
|
14 |
| - | ^^^ |
| 11 | + | ^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
| 13 | + |
| 14 | +error[E0015]: `?` cannot convert from residual of `TryMe` in constant functions |
| 15 | + --> $DIR/const-try.rs:33:5 |
15 | 16 | |
|
16 |
| - = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
17 |
| - = note: adding a non-const method body in the future would be a breaking change |
| 17 | +LL | TryMe?; |
| 18 | + | ^^^^^^ |
| 19 | + | |
| 20 | +note: impl defined here, but it is not `const` |
| 21 | + --> $DIR/const-try.rs:15:1 |
| 22 | + | |
| 23 | +LL | impl const FromResidual<Error> for TryMe { |
| 24 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 25 | + = note: calls in constant functions are limited to constant functions, tuple structs and tuple variants |
18 | 26 |
|
19 | 27 | error: aborting due to 2 previous errors
|
20 | 28 |
|
| 29 | +For more information about this error, try `rustc --explain E0015`. |
0 commit comments