Created
September 27, 2011 05:39
-
-
Save brson/1244413 to your computer and use it in GitHub Desktop.
This file contains 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
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