2023-04-16 06:12:37 -05:00
|
|
|
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:23:25
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
|
|
|
|
| ^^^^
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-04-16 06:12:37 -05: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
|
2023-03-24 04:17:51 -05:00
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
error: ~const can only be applied to `#[const_trait]` traits
|
|
|
|
--> $DIR/const-drop-fail-2.rs:29:26
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
LL | const fn check<T: ~const Destruct>(_: T) {}
|
|
|
|
| ^^^^^^^^
|
2023-03-24 04:17:51 -05:00
|
|
|
|
2023-04-16 06:12:37 -05:00
|
|
|
error: const `impl` for trait `Drop` which is not marked with `#[const_trait]`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:39:25
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
|
|
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
|
2023-04-16 06:12:37 -05:00
|
|
|
| ^^^^
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-04-16 06:12:37 -05: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
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|