1 error[E0716]: temporary value dropped while borrowed
2 --> $DIR/lifetime_errors_on_promotion_misusage.rs:12:35
4 LL | let phantom_pinned = identity(pin!(PhantomPinned));
5 | ^^^^^^^^^^^^^^^^^^^ - temporary value is freed at the end of this statement
7 | creates a temporary value which is freed while still in use
9 LL | stuff(phantom_pinned)
10 | -------------- borrow later used here
12 = note: consider using a `let` binding to create a longer lived value
13 = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
15 error[E0716]: temporary value dropped while borrowed
16 --> $DIR/lifetime_errors_on_promotion_misusage.rs:19:30
18 LL | let phantom_pinned = {
19 | -------------- borrow later stored here
20 LL | let phantom_pinned = pin!(PhantomPinned);
21 | ^^^^^^^^^^^^^^^^^^^ creates a temporary value which is freed while still in use
24 | - temporary value is freed at the end of this statement
26 = note: consider using a `let` binding to create a longer lived value
27 = note: this error originates in the macro `pin` (in Nightly builds, run with -Z macro-backtrace for more info)
29 error: aborting due to 2 previous errors
31 For more information about this error, try `rustc --explain E0716`.