2023-03-24 04:17:51 -05:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
|
|
|
|
--> $DIR/const-drop-fail-2.rs:31:23
|
|
|
|
|
|
2023-03-28 03:40:37 -05:00
|
|
|
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
|
2023-03-24 04:17:51 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
|
|
|
|
|
|
|
|
|
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:31:23
|
|
|
|
|
|
2023-03-28 03:40:37 -05:00
|
|
|
LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(
|
2023-03-24 04:17:51 -05:00
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
note: required by a bound in `ConstDropImplWithBounds`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:21:35
|
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
|
|
|
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
|
2023-03-28 03:40:37 -05:00
|
|
|
--> $DIR/const-drop-fail-2.rs:33:5
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-03-28 03:40:37 -05:00
|
|
|
LL | ConstDropImplWithBounds(PhantomData)
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
|
|
|
note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
|
2023-03-28 03:40:37 -05:00
|
|
|
--> $DIR/const-drop-fail-2.rs:33:5
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
2023-03-28 03:40:37 -05:00
|
|
|
LL | ConstDropImplWithBounds(PhantomData)
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2023-03-24 04:17:51 -05:00
|
|
|
note: required by a bound in `ConstDropImplWithBounds`
|
|
|
|
--> $DIR/const-drop-fail-2.rs:21:35
|
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
|
|
|
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
|
|
|
|
|
|
|
error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not
|
2023-03-28 03:40:37 -05:00
|
|
|
--> $DIR/const-drop-fail-2.rs:39:9
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
|
|
|
LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
note: the implementor must specify the same requirement
|
2023-03-28 03:40:37 -05:00
|
|
|
--> $DIR/const-drop-fail-2.rs:37:1
|
2023-03-24 04:17:51 -05:00
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
|
|
|
|
Some errors have detailed explanations: E0277, E0367.
|
|
|
|
For more information about an error, try `rustc --explain E0277`.
|