mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
47 lines
1.6 KiB
Plaintext
47 lines
1.6 KiB
Plaintext
error[E0367]: `NonTrivialDrop` does not implement `[const] Destruct`
|
|
--> $DIR/const-drop-fail.rs:19:30
|
|
|
|
|
LL | struct ConstImplWithDropGlue(NonTrivialDrop);
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
note: required for this `Drop` impl
|
|
--> $DIR/const-drop-fail.rs:22:1
|
|
|
|
|
LL | impl const Drop for ConstImplWithDropGlue {
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
|
|
--> $DIR/const-drop-fail.rs:35:5
|
|
|
|
|
LL | const _: () = check($exp);
|
|
| ----- required by a bound introduced by this call
|
|
...
|
|
LL | NonTrivialDrop,
|
|
| ^^^^^^^^^^^^^^
|
|
|
|
|
note: required by a bound in `check`
|
|
--> $DIR/const-drop-fail.rs:26:19
|
|
|
|
|
LL | const fn check<T: [const] Destruct>(_: T) {}
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `check`
|
|
|
|
error[E0277]: the trait bound `NonTrivialDrop: const Destruct` is not satisfied
|
|
--> $DIR/const-drop-fail.rs:37:5
|
|
|
|
|
LL | const _: () = check($exp);
|
|
| ----- required by a bound introduced by this call
|
|
...
|
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
note: required by a bound in `check`
|
|
--> $DIR/const-drop-fail.rs:26:19
|
|
|
|
|
LL | const fn check<T: [const] Destruct>(_: T) {}
|
|
| ^^^^^^^^^^^^^^^^ required by this bound in `check`
|
|
|
|
error: aborting due to 3 previous errors
|
|
|
|
Some errors have detailed explanations: E0277, E0367.
|
|
For more information about an error, try `rustc --explain E0277`.
|