Closed
Description
New to rust, I can't debug it, but I tried the following changes to main without figuring it out:
fn main() {
let args: ~[~str] = core::os::args();
assert!(args.len()>1);
/* This works */
io::println( args[1] );
/* This works too */
io::println( sha1( ~"xyz" ) );
/* This gives a compile error:
"moving out of immutable vec content" */
io::println( sha1( args[1] ) );
}
My rust compiled from git commit 5f13e9c
Metadata
Metadata
Assignees
Labels
No labels