rust/tests/ui/explicit-tail-calls/ctfe-arg-bad-borrow.stderr
2024-07-07 17:11:05 +02:00

15 lines
454 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);
| ^^^^^^ borrowed value does not live long enough
LL |
LL | }
| - `local` dropped here while still borrowed
error: aborting due to 1 previous error
For more information about this error, try `rustc --explain E0597`.