2022-03-21 00:52:41 -05:00
|
|
|
error[E0277]: can't drop `NonTrivialDrop` in const contexts
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:43:5
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2021-09-16 09:01:37 -05:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
| ----- required by a bound introduced by this call
|
|
|
|
...
|
2021-09-02 05:59:53 -05:00
|
|
|
LL | NonTrivialDrop,
|
2022-08-18 07:16:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `NonTrivialDrop`
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
= note: the trait bound `NonTrivialDrop: ~const Destruct` is not satisfied
|
2021-09-02 05:59:53 -05:00
|
|
|
note: required by a bound in `check`
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:34:19
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
LL | const fn check<T: ~const Destruct>(_: T) {}
|
|
|
|
| ^^^^^^^^^^^^^^^ required by this bound in `check`
|
2021-12-24 08:50:44 -06:00
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | &NonTrivialDrop,
|
|
|
|
| +
|
|
|
|
LL | &mut NonTrivialDrop,
|
|
|
|
| ++++
|
2021-09-02 05:59:53 -05:00
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
error[E0277]: can't drop `NonTrivialDrop` in const contexts
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:45:5
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2021-09-16 09:01:37 -05:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
| ----- required by a bound introduced by this call
|
|
|
|
...
|
2021-09-02 05:59:53 -05:00
|
|
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
|
2022-03-21 00:52:41 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Destruct` is not implemented for `NonTrivialDrop`
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
note: the trait `Destruct` is implemented for `NonTrivialDrop`, but that implementation is not `const`
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:45:5
|
2022-01-26 21:09:44 -06:00
|
|
|
|
|
|
|
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2022-01-18 03:42:35 -06:00
|
|
|
note: required because it appears within the type `ConstImplWithDropGlue`
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:16:8
|
2022-01-18 03:42:35 -06:00
|
|
|
|
|
|
|
|
LL | struct ConstImplWithDropGlue(NonTrivialDrop);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^
|
2021-09-02 05:59:53 -05:00
|
|
|
note: required by a bound in `check`
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:34:19
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
LL | const fn check<T: ~const Destruct>(_: T) {}
|
|
|
|
| ^^^^^^^^^^^^^^^ required by this bound in `check`
|
2021-09-02 05:59:53 -05:00
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: ~const Destruct` is not satisfied
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:47:5
|
2021-09-03 05:04:43 -05:00
|
|
|
|
|
2022-01-18 03:42:35 -06:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
| ----- required by a bound introduced by this call
|
|
|
|
...
|
2021-09-03 05:04:43 -05:00
|
|
|
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
2022-08-18 07:16:35 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const Destruct` is not implemented for `ConstDropImplWithBounds<NonTrivialDrop>`
|
2021-09-03 05:04:43 -05:00
|
|
|
|
|
2022-08-15 15:31:37 -05:00
|
|
|
note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `~const Destruct`
|
2021-10-13 08:58:41 -05:00
|
|
|
--> $DIR/const-drop-fail.rs:28:25
|
|
|
|
|
|
|
|
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
|
|
|
|
| ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
= note: 1 redundant requirement hidden
|
2022-08-15 15:31:37 -05:00
|
|
|
= note: required for `ConstDropImplWithBounds<NonTrivialDrop>` to implement `~const Destruct`
|
2022-01-18 03:42:35 -06:00
|
|
|
note: required by a bound in `check`
|
2022-02-09 12:53:40 -06:00
|
|
|
--> $DIR/const-drop-fail.rs:34:19
|
2022-01-18 03:42:35 -06:00
|
|
|
|
|
2022-03-21 00:52:41 -05:00
|
|
|
LL | const fn check<T: ~const Destruct>(_: T) {}
|
|
|
|
| ^^^^^^^^^^^^^^^ required by this bound in `check`
|
2021-12-24 08:50:44 -06:00
|
|
|
help: consider borrowing here
|
|
|
|
|
|
|
|
|
LL | &ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
|
|
|
| +
|
|
|
|
LL | &mut ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
|
|
|
| ++++
|
2021-09-03 05:04:43 -05:00
|
|
|
|
2022-01-18 03:42:35 -06:00
|
|
|
error: aborting due to 3 previous errors
|
2021-09-02 05:59:53 -05:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|