1 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied
2 --> $DIR/const-drop-fail.rs:44:5
4 LL | const _: () = check($exp);
5 | ----- required by a bound introduced by this call
8 | ^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
10 note: required by a bound in `check`
11 --> $DIR/const-drop-fail.rs:35:19
13 LL | const fn check<T: ~const Drop>(_: T) {}
14 | ^^^^^^^^^^^ required by this bound in `check`
15 help: consider borrowing here
19 LL | &mut NonTrivialDrop,
22 error[E0277]: the trait bound `NonTrivialDrop: ~const Drop` is not satisfied in `ConstImplWithDropGlue`
23 --> $DIR/const-drop-fail.rs:46:5
25 LL | const _: () = check($exp);
26 | ----- required by a bound introduced by this call
28 LL | ConstImplWithDropGlue(NonTrivialDrop),
29 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
31 note: required because it appears within the type `ConstImplWithDropGlue`
32 --> $DIR/const-drop-fail.rs:17:8
34 LL | struct ConstImplWithDropGlue(NonTrivialDrop);
35 | ^^^^^^^^^^^^^^^^^^^^^
36 note: required by a bound in `check`
37 --> $DIR/const-drop-fail.rs:35:19
39 LL | const fn check<T: ~const Drop>(_: T) {}
40 | ^^^^^^^^^^^ required by this bound in `check`
42 error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: ~const Drop` is not satisfied
43 --> $DIR/const-drop-fail.rs:48:5
45 LL | const _: () = check($exp);
46 | ----- required by a bound introduced by this call
48 LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
49 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
51 note: required because of the requirements on the impl of `~const Drop` for `ConstDropImplWithBounds<NonTrivialDrop>`
52 --> $DIR/const-drop-fail.rs:29:25
54 LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
55 | ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
56 note: required by a bound in `check`
57 --> $DIR/const-drop-fail.rs:35:19
59 LL | const fn check<T: ~const Drop>(_: T) {}
60 | ^^^^^^^^^^^ required by this bound in `check`
61 help: consider borrowing here
63 LL | &ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
65 LL | &mut ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
68 error: aborting due to 3 previous errors
70 For more information about this error, try `rustc --explain E0277`.