Skip to content

Instantly share code, notes, and snippets.

@brson
Created September 27, 2011 05:39
Show Gist options
  • Save brson/1244413 to your computer and use it in GitHub Desktop.
Save brson/1244413 to your computer and use it in GitHub Desktop.
fn movearg(i: ~mutable int) {
let j <- i;
*j = 200;
}
fn movemode(-i: ~int) {
let j <- i;
}
fn main() {
let i = ~mutable 100;
movearg(i);
// Still 100. Where was the implicit copy?
log_err *i;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment