Created
December 19, 2013 01:58
-
-
Save ezyang/8033155 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /home/ezyang/Dev/rust-sandbox/test.rs:13:20: 13:27 error: cannot borrow `*z` as mutable more than once at a time | |
| /home/ezyang/Dev/rust-sandbox/test.rs:13 let x = &mut *z; | |
| ^~~~~~~ | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12:24: 12:25 note: second borrow of `*z` as mutable occurs here | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12 let r = foo(z); | |
| ^ | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12:24: 12:25 note: old loan gen'd here | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12 let r = foo(z); | |
| ^ | |
| /home/ezyang/Dev/rust-sandbox/test.rs:7:4: 16:5 note: old loan kill'd here | |
| /home/ezyang/Dev/rust-sandbox/test.rs:7 match x { | |
| /home/ezyang/Dev/rust-sandbox/test.rs:8 &Z(_) => { | |
| /home/ezyang/Dev/rust-sandbox/test.rs:9 fail!() | |
| /home/ezyang/Dev/rust-sandbox/test.rs:10 }, | |
| /home/ezyang/Dev/rust-sandbox/test.rs:11 &S(~ref mut z) => { | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12 let r = foo(z); | |
| ... | |
| /home/ezyang/Dev/rust-sandbox/test.rs:13:20: 13:27 note: new loan gen'd here | |
| /home/ezyang/Dev/rust-sandbox/test.rs:13 let x = &mut *z; | |
| ^~~~~~~ | |
| /home/ezyang/Dev/rust-sandbox/test.rs:11:26: 15:9 note: new loan kill'd here | |
| /home/ezyang/Dev/rust-sandbox/test.rs:11 &S(~ref mut z) => { | |
| /home/ezyang/Dev/rust-sandbox/test.rs:12 let r = foo(z); | |
| /home/ezyang/Dev/rust-sandbox/test.rs:13 let x = &mut *z; | |
| /home/ezyang/Dev/rust-sandbox/test.rs:14 r | |
| /home/ezyang/Dev/rust-sandbox/test.rs:15 }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment