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