2024-11-24 00:30:16 +00:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
|
2025-07-23 13:31:22 +02:00
|
|
|
--> $DIR/const-drop-fail.rs:34:5
|
2024-02-14 12:28:07 +00:00
|
|
|
|
|
2024-11-24 01:15:04 +00:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
|
| ----- required by a bound introduced by this call
|
2024-02-14 12:28:07 +00:00
|
|
|
...
|
2024-11-24 01:15:04 +00:00
|
|
|
LL | NonTrivialDrop,
|
|
|
|
|
| ^^^^^^^^^^^^^^
|
2024-11-24 00:30:16 +00:00
|
|
|
|
|
2024-11-24 01:15:04 +00:00
|
|
|
note: required by a bound in `check`
|
2025-07-23 13:31:22 +02:00
|
|
|
--> $DIR/const-drop-fail.rs:25:19
|
2024-11-24 01:15:04 +00:00
|
|
|
|
|
2025-03-11 12:08:45 +00:00
|
|
|
LL | const fn check<T: [const] Destruct>(_: T) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `check`
|
2024-02-14 12:28:07 +00:00
|
|
|
|
2024-11-24 00:30:16 +00:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
|
2025-07-23 13:31:22 +02:00
|
|
|
--> $DIR/const-drop-fail.rs:36:5
|
2024-02-14 12:28:07 +00:00
|
|
|
|
|
2024-11-24 01:15:04 +00:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
|
| ----- required by a bound introduced by this call
|
2024-02-14 12:28:07 +00:00
|
|
|
...
|
2024-11-24 01:15:04 +00:00
|
|
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
|
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
|
|
note: required by a bound in `check`
|
2025-07-23 13:31:22 +02:00
|
|
|
--> $DIR/const-drop-fail.rs:25:19
|
2024-11-24 00:30:16 +00:00
|
|
|
|
|
2025-03-11 12:08:45 +00:00
|
|
|
LL | const fn check<T: [const] Destruct>(_: T) {}
|
|
|
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `check`
|
2024-02-14 12:28:07 +00:00
|
|
|
|
2024-11-24 00:30:16 +00:00
|
|
|
error: aborting due to 2 previous errors
|
2021-09-02 10:59:53 +00:00
|
|
|
|
2024-11-24 00:30:16 +00:00
|
|
|
For more information about this error, try `rustc --explain E0277`.
|