2019-12-22 10:22:44 -05:00
|
|
|
error[E0597]: `try_catch` does not live long enough
|
2020-01-19 21:16:37 -05:00
|
|
|
--> $DIR/try_catch_lifetimes.rs:11:14
|
2019-12-22 10:22:44 -05:00
|
|
|
|
|
2020-01-19 21:16:37 -05:00
|
|
|
9 | let _leaked = {
|
2019-12-22 10:22:44 -05:00
|
|
|
| ------- borrow later stored here
|
2020-01-19 21:16:37 -05:00
|
|
|
10 | let mut try_catch = v8::TryCatch::new(scope);
|
|
|
|
11 | let tc = try_catch.enter();
|
2019-12-22 10:22:44 -05:00
|
|
|
| ^^^^^^^^^ borrowed value does not live long enough
|
|
|
|
...
|
2020-01-19 21:16:37 -05:00
|
|
|
16 | };
|
2019-12-22 10:22:44 -05:00
|
|
|
| - `try_catch` dropped here while still borrowed
|