0
0
Fork 0
mirror of https://github.com/denoland/rusty_v8.git synced 2024-12-29 02:29:10 -05:00
denoland-rusty-v8/tests/compile_fail/handle_scope_lifetimes.stderr

45 lines
1.8 KiB
Text
Raw Normal View History

error[E0499]: cannot borrow `isolate` as mutable more than once at a time
--> $DIR/handle_scope_lifetimes.rs:9:47
|
7 | let mut hs = v8::EscapableHandleScope::new(&mut isolate);
| ------------ first mutable borrow occurs here
8 | let hs = hs.enter();
9 | let _fail = v8::EscapableHandleScope::new(&mut isolate);
| ^^^^^^^^^^^^ second mutable borrow occurs here
10 | let _local = v8::Integer::new(hs, 123);
| -- first borrow later used here
error[E0499]: cannot borrow `*hs1` as mutable more than once at a time
--> $DIR/handle_scope_lifetimes.rs:20:34
|
18 | let mut hs2 = v8::EscapableHandleScope::new(hs1);
| --- first mutable borrow occurs here
19 | let hs2 = hs2.enter();
20 | let _fail = v8::Integer::new(hs1, 123);
| ^^^ second mutable borrow occurs here
21 | let _local2 = v8::Integer::new(hs2, 123);
| --- first borrow later used here
error[E0597]: `hs` does not live long enough
--> $DIR/handle_scope_lifetimes.rs:27:14
|
25 | let _leak1 = {
| ------ borrow later stored here
26 | let mut hs = v8::EscapableHandleScope::new(&mut isolate);
27 | let hs = hs.enter();
| ^^ borrowed value does not live long enough
28 | v8::Integer::new(hs, 456)
29 | };
| - `hs` dropped here while still borrowed
error[E0597]: `hs` does not live long enough
--> $DIR/handle_scope_lifetimes.rs:33:5
|
33 | hs.enter()
| ^^--------
| |
| borrowed value does not live long enough
| borrow later used here
34 | };
| - `hs` dropped here while still borrowed