Files
rust/tests/ui/explicit-tail-calls/ctfe-arg-bad-borrow.stderr
Waffle Lapkin af2ce8b702 don't drop types with no drop glue when tailcalling
this is required as otherwise drops of `&mut` refs count as a usage of a
'two-phase temporary' causing an ICE.
2025-01-24 06:45:19 +01:00

14 lines
496 B
Plaintext

error[E0597]: `local` does not live long enough
--> $DIR/ctfe-arg-bad-borrow.rs:8:25
|
LL | let local = Type;
| ----- binding `local` declared here
LL | become takes_borrow(&local);
| ^^^^^^- `local` dropped here while still borrowed
| |
| borrowed value does not live long enough
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.