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-
91error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied
10- --> $DIR/const-drop-fail.rs:45 :5
2+ --> $DIR/const-drop-fail.rs:44 :5
113 |
124LL | const _: () = check($exp);
135 | ----- required by a bound introduced by this call
@@ -16,50 +8,51 @@ LL | NonTrivialDrop,
168 | ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop`
179 |
1810note: required by a bound in `check`
19- --> $DIR/const-drop-fail.rs:36 :19
11+ --> $DIR/const-drop-fail.rs:35 :19
2012 |
2113LL | const fn check<T: ~const Drop>(_: T) {}
2214 | ^^^^^^^^^^^ required by this bound in `check`
2315
24- error[E0277]: the trait bound `ConstImplWithDropGlue : Drop` is not satisfied
25- --> $DIR/const-drop-fail.rs:47 :5
16+ error[E0277]: the trait bound `NonTrivialDrop : Drop` is not satisfied in `ConstImplWithDropGlue`
17+ --> $DIR/const-drop-fail.rs:46 :5
2618 |
2719LL | const _: () = check($exp);
2820 | ----- required by a bound introduced by this call
2921...
3022LL | ConstImplWithDropGlue(NonTrivialDrop),
31- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue `
23+ | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `Drop` is not implemented for `NonTrivialDrop `
3224 |
25+ note: required because it appears within the type `ConstImplWithDropGlue`
26+ --> $DIR/const-drop-fail.rs:17:8
27+ |
28+ LL | struct ConstImplWithDropGlue(NonTrivialDrop);
29+ | ^^^^^^^^^^^^^^^^^^^^^
3330note: required by a bound in `check`
34- --> $DIR/const-drop-fail.rs:36 :19
31+ --> $DIR/const-drop-fail.rs:35 :19
3532 |
3633LL | const fn check<T: ~const Drop>(_: T) {}
3734 | ^^^^^^^^^^^ required by this bound in `check`
3835
3936error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
40- --> $DIR/const-drop-fail.rs:49:5
41- |
42- LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
43- | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
44- |
45- note: required by a bound in `ConstDropImplWithBounds`
46- --> $DIR/const-drop-fail.rs:27:35
47- |
48- LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
49- | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
50-
51- error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
52- --> $DIR/const-drop-fail.rs:49:5
37+ --> $DIR/const-drop-fail.rs:48:5
5338 |
39+ LL | const _: () = check($exp);
40+ | ----- required by a bound introduced by this call
41+ ...
5442LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
5543 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
5644 |
57- note: required by a bound in ` ConstDropImplWithBounds`
58- --> $DIR/const-drop-fail.rs:27:35
45+ note: required because of the requirements on the impl of `Drop` for ` ConstDropImplWithBounds<NonTrivialDrop> `
46+ --> $DIR/const-drop-fail.rs:29:25
5947 |
60- LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
61- | ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
48+ LL | impl<T: ~const A> const Drop for ConstDropImplWithBounds<T> {
49+ | ^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^^^
50+ note: required by a bound in `check`
51+ --> $DIR/const-drop-fail.rs:35:19
52+ |
53+ LL | const fn check<T: ~const Drop>(_: T) {}
54+ | ^^^^^^^^^^^ required by this bound in `check`
6255
63- error: aborting due to 5 previous errors
56+ error: aborting due to 3 previous errors
6457
6558For more information about this error, try `rustc --explain E0277`.
0 commit comments