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