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