rust/tests/ui/pin-macro/lifetime_errors_on_promotion_misusage.stderr
2025-04-15 11:14:23 +02:00

29 lines
1.2 KiB
Text

error[E0597]: value does not live long enough
--> $DIR/lifetime_errors_on_promotion_misusage.rs:11:35
|
LL | let phantom_pinned = identity(pin!(PhantomPinned));
| ^^^^^^^^^^^^^^^^^^^ - value dropped here while still borrowed
| |
| borrowed value does not live long enough
LL |
LL | stuff(phantom_pinned)
| -------------- borrow later used here
|
= note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
error[E0597]: value does not live long enough
--> $DIR/lifetime_errors_on_promotion_misusage.rs:18:30
|
LL | let phantom_pinned = {
| -------------- borrow later stored here
LL | let phantom_pinned = pin!(PhantomPinned);
| ^^^^^^^^^^^^^^^^^^^ borrowed value does not live long enough
...
LL | };
| - value dropped here while still borrowed
|
= note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0597`.