2018-12-02 13:42:43 -06:00
|
|
|
error[E0597]: `arena` does not live long enough
|
2019-04-22 02:40:08 -05:00
|
|
|
--> $DIR/dropck-tarena-unsound-drop.rs:41:7
|
2018-12-02 13:42:43 -06:00
|
|
|
|
|
2023-01-15 13:57:32 -06:00
|
|
|
LL | let arena: TypedArena<C> = TypedArena::default();
|
|
|
|
| ----- binding `arena` declared here
|
2018-12-02 13:42:43 -06:00
|
|
|
LL | f(&arena);
|
2019-04-22 02:40:08 -05:00
|
|
|
| ^^^^^^ borrowed value does not live long enough
|
2019-03-09 06:03:44 -06:00
|
|
|
LL | }
|
2019-04-22 02:40:08 -05:00
|
|
|
| -
|
|
|
|
| |
|
|
|
|
| `arena` dropped here while still borrowed
|
2020-09-02 02:40:56 -05:00
|
|
|
| borrow might be used here, when `arena` is dropped and runs the `Drop` code for type `TypedArena`
|
2018-12-02 13:42:43 -06:00
|
|
|
|
|
|
|
error: aborting due to previous error
|
|
|
|
|
|
|
|
For more information about this error, try `rustc --explain E0597`.
|