-note: required by a bound in `check`
- --> $DIR/const-drop-fail.rs:35:19
- |
-LL | const fn check<T: ~const Destruct>(_: T) {}
- | ^^^^^^^^^^^^^^^ required by this bound in `check`
-
-error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied
- --> $DIR/const-drop-fail.rs:48:47
- |
-LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
- | ----------------------------------------- ^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop`
- | |
- | required by a bound introduced by this call
- |
-note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const`
- --> $DIR/const-drop-fail.rs:48:47
- |
-LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
- | ^^^^^^^^^^^
-note: required by a bound in `ConstDropImplWithBounds`
- --> $DIR/const-drop-fail.rs:27: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
- --> $DIR/const-drop-fail.rs:48:5
- |
-LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ 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.rs:48:5
- |
-LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
-note: required by a bound in `ConstDropImplWithBounds`
- --> $DIR/const-drop-fail.rs:27: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
- --> $DIR/const-drop-fail.rs:55:9
- |
-LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> {
- | ^^^^^^^^
- |
-note: the implementor must specify the same requirement
- --> $DIR/const-drop-fail.rs:53:1
- |
-LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>);
- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^