rust/tests/ui/traits/const-traits/const-drop-fail-2.precise.stderr

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

23 lines
890 B
Plaintext
Raw Normal View History

2024-12-29 04:42:21 +00:00
error[E0277]: the trait bound `NonTrivialDrop: const A` is not satisfied
--> $DIR/const-drop-fail-2.rs:31:23
|
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
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`
2024-11-24 00:30:16 +00:00
error: aborting due to 1 previous error
2024-11-24 00:30:16 +00:00
For more information about this error, try `rustc --explain E0277`.