Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 1 | error: const `impl` for trait `Drop` which is not marked with `#[const_trait]` |
| 2 | --> $DIR/const-drop-fail-2.rs:23:25 |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 3 | | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 4 | LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> { |
| 5 | | ^^^^ |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 6 | | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 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 |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 9 | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 10 | error: ~const can only be applied to `#[const_trait]` traits |
| 11 | --> $DIR/const-drop-fail-2.rs:29:26 |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 12 | | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 13 | LL | const fn check<T: ~const Destruct>(_: T) {} |
| 14 | | ^^^^^^^^ |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 15 | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 16 | error: const `impl` for trait `Drop` which is not marked with `#[const_trait]` |
| 17 | --> $DIR/const-drop-fail-2.rs:39:25 |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 18 | | |
| 19 | LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> { |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 20 | | ^^^^ |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 21 | | |
Deadbeef | 4c6ddc0 | 2023-04-16 11:12:37 | [diff] [blame] | 22 | = note: marking a trait with `#[const_trait]` ensures all default method bodies are `const` |
| 23 | = note: adding a non-const method body in the future would be a breaking change |
Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame] | 24 | |
| 25 | error: aborting due to 3 previous errors |
| 26 | |