rust/tests/ui/rfc-2632-const-trait-impl/const-drop-fail-2.precise.stderr

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

27 lines
1.0 KiB
Plaintext
Raw Normal View History

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-04-16 06:12:37 -05:00
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
| ^^^^
|
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-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-04-16 06:12:37 -05:00
LL | const fn check<T: ~const Destruct>(_: T) {}
| ^^^^^^^^
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
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
2023-04-16 06:12:37 -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
error: aborting due to 3 previous errors