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: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
32 --> $DIR/const-drop-fail.rs:46:5
34 LL | ConstImplWithDropGlue(NonTrivialDrop),
35 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
36 note: required because it appears within the type `ConstImplWithDropGlue`
37 --> $DIR/const-drop-fail.rs:17:8
39 LL | struct ConstImplWithDropGlue(NonTrivialDrop);
40 | ^^^^^^^^^^^^^^^^^^^^^
41 note: required by a bound in `check`
42 --> $DIR/const-drop-fail.rs:35:19
44 LL | const fn check<T: ~const Drop>(_: T) {}
45 | ^^^^^^^^^^^ required by this bound in `check`
47 error[E0277]: the trait bound `ConstDropImplWithBounds<NonTrivialDrop>: ~const Drop` is not satisfied
48 --> $DIR/const-drop-fail.rs:48:5
50 LL | const _: () = check($exp);
51 | ----- required by a bound introduced by this call
53 LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
54 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected an implementor of trait `~const Drop`
56 note: required because of the requirements on the impl of `~const Drop` for `ConstDropImplWithBounds<NonTrivialDrop>`
57 --> $DIR/const-drop-fail.rs:29:25
59 LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
60 | ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
61 note: required by a bound in `check`
62 --> $DIR/const-drop-fail.rs:35:19
64 LL | const fn check<T: ~const Drop>(_: T) {}
65 | ^^^^^^^^^^^ required by this bound in `check`
66 help: consider borrowing here
68 LL | &ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
70 LL | &mut ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
73 error: aborting due to 3 previous errors
75 For more information about this error, try `rustc --explain E0277`.