|
| 1 | +error: `~const` is not allowed here |
| 2 | + --> $DIR/const-drop-fail.rs:27:35 |
| 3 | + | |
| 4 | +LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); |
| 5 | + | ^^^^^^^^ |
| 6 | + | |
| 7 | + = note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions |
| 8 | + |
1 | 9 | error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied |
2 | | - --> $DIR/const-drop-fail.rs:30:5 |
| 10 | + --> $DIR/const-drop-fail.rs:45:5 |
3 | 11 | | |
4 | 12 | LL | NonTrivialDrop, |
5 | 13 | | ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop` |
6 | 14 | | |
7 | 15 | note: required by a bound in `check` |
8 | | - --> $DIR/const-drop-fail.rs:21:19 |
| 16 | + --> $DIR/const-drop-fail.rs:36:19 |
9 | 17 | | |
10 | 18 | LL | const fn check<T: ~const Drop>(_: T) {} |
11 | 19 | | ^^^^^^^^^^^ required by this bound in `check` |
12 | 20 |
|
13 | 21 | error[E0277]: the trait bound `ConstImplWithDropGlue: Drop` is not satisfied |
14 | | - --> $DIR/const-drop-fail.rs:32:5 |
| 22 | + --> $DIR/const-drop-fail.rs:47:5 |
15 | 23 | | |
16 | 24 | LL | ConstImplWithDropGlue(NonTrivialDrop), |
17 | 25 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue` |
18 | 26 | | |
19 | 27 | note: required by a bound in `check` |
20 | | - --> $DIR/const-drop-fail.rs:21:19 |
| 28 | + --> $DIR/const-drop-fail.rs:36:19 |
21 | 29 | | |
22 | 30 | LL | const fn check<T: ~const Drop>(_: T) {} |
23 | 31 | | ^^^^^^^^^^^ required by this bound in `check` |
24 | 32 |
|
25 | | -error: aborting due to 2 previous errors |
| 33 | +error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied |
| 34 | + --> $DIR/const-drop-fail.rs:49:5 |
| 35 | + | |
| 36 | +LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData), |
| 37 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop` |
| 38 | + | |
| 39 | +note: required by `ConstDropImplWithBounds` |
| 40 | + --> $DIR/const-drop-fail.rs:27:1 |
| 41 | + | |
| 42 | +LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); |
| 43 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ |
| 44 | + |
| 45 | +error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied |
| 46 | + --> $DIR/const-drop-fail.rs:49:5 |
| 47 | + | |
| 48 | +LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData), |
| 49 | + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop` |
| 50 | + | |
| 51 | +note: required by a bound in `ConstDropImplWithBounds` |
| 52 | + --> $DIR/const-drop-fail.rs:27:35 |
| 53 | + | |
| 54 | +LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>); |
| 55 | + | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds` |
| 56 | + |
| 57 | +error: aborting due to 5 previous errors |
26 | 58 |
|
27 | 59 | For more information about this error, try `rustc --explain E0277`. |
0 commit comments