Skip to content

Instantly share code, notes, and snippets.

@sdepold
Created December 21, 2012 20:37
Show Gist options
  • Save sdepold/4355636 to your computer and use it in GitHub Desktop.
Save sdepold/4355636 to your computer and use it in GitHub Desktop.
fn get_rsvm_directory() -> ~str {
os::homedir().get_ref().to_str() + "/.rsvm"
}
feature/rust-rewrite ~/Projects/rsvm ∴ make
rustc ./rsvm.rs -o dist/rsvm
./rsvm.rs:68:4: 68:18 error: illegal borrow: borrowed value does not live long enough
./rsvm.rs:68 os::homedir().get_ref().to_str() + "/.rsvm"
^~~~~~~~~~~~~~
./rsvm.rs:68:4: 68:38 note: borrowed pointer must be valid for the call at 68:4...
./rsvm.rs:68 os::homedir().get_ref().to_str() + "/.rsvm"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./rsvm.rs:68:4: 68:28 note: ...but borrowed value is only valid for the call at 68:4
./rsvm.rs:68 os::homedir().get_ref().to_str() + "/.rsvm"
^~~~~~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
make: *** [all] Error 101
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment