2024-12-29 04:42:21 +00:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: const A` is not satisfied
|
2024-11-24 01:15:04 +00:00
|
|
|
--> $DIR/const-drop-fail-2.rs:31:23
|
2023-03-24 09:17:51 +00:00
|
|
|
|
|
2024-11-24 01:15:04 +00:00
|
|
|
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2024-12-29 04:42:21 +00:00
|
|
|
note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `const Drop`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:25:25
|
|
|
|
|
|
|
|
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
|
|
|
|
| ------ ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
| |
|
|
|
|
| unsatisfied trait bound introduced here
|
2024-11-24 01:15:04 +00:00
|
|
|
note: required by a bound in `check`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:21:19
|
|
|
|
|
|
|
|
|
LL | const fn check<T: ~const Destruct>(_: T) {}
|
|
|
|
| ^^^^^^ required by this bound in `check`
|
2023-03-24 09:17:51 +00:00
|
|
|
|
2024-11-24 00:30:16 +00:00
|
|
|
error: aborting due to 1 previous error
|
2023-03-24 09:17:51 +00:00
|
|
|
|
2024-11-24 00:30:16 +00:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|