Deadbeef | b17e668 | 2023-03-24 09:17:51 | [diff] [blame^] | 1 | error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied |
| 2 | --> $DIR/const-drop-fail-2.rs:31:23 |
| 3 | | |
| 4 | LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); |
| 5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` |
| 6 | | |
| 7 | note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` |
| 8 | --> $DIR/const-drop-fail-2.rs:31:23 |
| 9 | | |
| 10 | LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); |
| 11 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 12 | note: required by a bound in `ConstDropImplWithBounds` |
| 13 | --> $DIR/const-drop-fail-2.rs:21:35 |
| 14 | | |
| 15 | LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); |
| 16 | | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` |
| 17 | |
| 18 | error[E0277]: the trait bound `NonTrivialDrop: ~const A` is not satisfied |
| 19 | --> $DIR/const-drop-fail-2.rs:31:64 |
| 20 | | |
| 21 | LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); |
| 22 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `~const A` is not implemented for `NonTrivialDrop` |
| 23 | | |
| 24 | note: the trait `A` is implemented for `NonTrivialDrop`, but that implementation is not `const` |
| 25 | --> $DIR/const-drop-fail-2.rs:31:64 |
| 26 | | |
| 27 | LL | const _: () = check::<ConstDropImplWithBounds<NonTrivialDrop>>(ConstDropImplWithBounds(PhantomData)); |
| 28 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 29 | note: required by a bound in `ConstDropImplWithBounds` |
| 30 | --> $DIR/const-drop-fail-2.rs:21:35 |
| 31 | | |
| 32 | LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); |
| 33 | | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` |
| 34 | |
| 35 | error[E0367]: `Drop` impl requires `T: ~const A` but the struct it is implemented for does not |
| 36 | --> $DIR/const-drop-fail-2.rs:37:9 |
| 37 | | |
| 38 | LL | impl<T: ~const A> const Drop for ConstDropImplWithNonConstBounds<T> { |
| 39 | | ^^^^^^^^ |
| 40 | | |
| 41 | note: the implementor must specify the same requirement |
| 42 | --> $DIR/const-drop-fail-2.rs:35:1 |
| 43 | | |
| 44 | LL | struct ConstDropImplWithNonConstBounds<T: A>(PhantomData<T>); |
| 45 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 46 | |
| 47 | error: aborting due to 3 previous errors |
| 48 | |
| 49 | Some errors have detailed explanations: E0277, E0367. |
| 50 | For more information about an error, try `rustc --explain E0277`. |