1
Fork 0

add note suggesting that predicate is satisfied but is not const

This commit is contained in:
Michael Goulet 2022-01-26 19:09:44 -08:00
parent 009c1d0248
commit 1ab97dbc52
9 changed files with 71 additions and 0 deletions

View file

@ -28,6 +28,11 @@ LL | const _: () = check($exp);
LL | ConstImplWithDropGlue(NonTrivialDrop),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ within `ConstImplWithDropGlue`, the trait `~const Drop` is not implemented for `NonTrivialDrop`
|
note: the trait `Drop` is implemented for `NonTrivialDrop`, but that implementation is not `const`
--> $DIR/const-drop-fail.rs:46:5
|
LL | ConstImplWithDropGlue(NonTrivialDrop),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required because it appears within the type `ConstImplWithDropGlue`
--> $DIR/const-drop-fail.rs:17:8
|