2021-09-03 10:04:43 +00:00
|
|
|
error: `~const` is not allowed here
|
|
|
|
--> $DIR/const-drop-fail.rs:27:35
|
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
|
|
|
| ^^^^^^^^
|
|
|
|
|
|
|
|
|
= note: only allowed on bounds on traits' associated types and functions, const fns, const impls and its associated functions
|
|
|
|
|
2021-09-02 10:59:53 +00:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: Drop` is not satisfied
|
2021-09-03 10:04:43 +00:00
|
|
|
--> $DIR/const-drop-fail.rs:45:5
|
2021-09-02 10:59:53 +00:00
|
|
|
|
|
2021-09-16 14:01:37 +00:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
| ----- required by a bound introduced by this call
|
|
|
|
...
|
2021-09-02 10:59:53 +00:00
|
|
|
LL | NonTrivialDrop,
|
|
|
|
| ^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `NonTrivialDrop`
|
|
|
|
|
|
|
|
|
note: required by a bound in `check`
|
2021-09-03 10:04:43 +00:00
|
|
|
--> $DIR/const-drop-fail.rs:36:19
|
2021-09-02 10:59:53 +00:00
|
|
|
|
|
|
|
|
LL | const fn check<T: ~const Drop>(_: T) {}
|
|
|
|
| ^^^^^^^^^^^ required by this bound in `check`
|
|
|
|
|
|
|
|
error[E0277]: the trait bound `ConstImplWithDropGlue: Drop` is not satisfied
|
2021-09-03 10:04:43 +00:00
|
|
|
--> $DIR/const-drop-fail.rs:47:5
|
2021-09-02 10:59:53 +00:00
|
|
|
|
|
2021-09-16 14:01:37 +00:00
|
|
|
LL | const _: () = check($exp);
|
|
|
|
| ----- required by a bound introduced by this call
|
|
|
|
...
|
2021-09-02 10:59:53 +00:00
|
|
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Drop` is not implemented for `ConstImplWithDropGlue`
|
|
|
|
|
|
|
|
|
note: required by a bound in `check`
|
2021-09-03 10:04:43 +00:00
|
|
|
--> $DIR/const-drop-fail.rs:36:19
|
2021-09-02 10:59:53 +00:00
|
|
|
|
|
|
|
|
LL | const fn check<T: ~const Drop>(_: T) {}
|
|
|
|
| ^^^^^^^^^^^ required by this bound in `check`
|
|
|
|
|
2021-09-03 10:04:43 +00:00
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
|
|
|
--> $DIR/const-drop-fail.rs:49:5
|
|
|
|
|
|
|
|
|
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
|
|
|
|
|
|
2021-10-05 23:04:09 +00:00
|
|
|
note: required by a bound in `ConstDropImplWithBounds`
|
|
|
|
--> $DIR/const-drop-fail.rs:27:35
|
2021-09-03 10:04:43 +00:00
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
2021-10-05 23:04:09 +00:00
|
|
|
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
2021-09-03 10:04:43 +00:00
|
|
|
|
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: A` is not satisfied
|
|
|
|
--> $DIR/const-drop-fail.rs:49:5
|
|
|
|
|
|
|
|
|
LL | ConstDropImplWithBounds::<NonTrivialDrop>(PhantomData),
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `A` is not implemented for `NonTrivialDrop`
|
|
|
|
|
|
|
|
|
note: required by a bound in `ConstDropImplWithBounds`
|
|
|
|
--> $DIR/const-drop-fail.rs:27:35
|
|
|
|
|
|
|
|
|
LL | struct ConstDropImplWithBounds<T: ~const A>(PhantomData<T>);
|
|
|
|
| ^^^^^^^^ required by this bound in `ConstDropImplWithBounds`
|
|
|
|
|
|
|
|
error: aborting due to 5 previous errors
|
2021-09-02 10:59:53 +00:00
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0277`.
|