I just built rust from git source on my osx 10.6.8.
amitava$ rustc --version
rustc 0.4 (c3f9b72 2012-09-30 21:35:32 -0700)
host: x86_64-apple-darwin
I am trying to compile the following "hello.rs"
fn main() {
let x = ["hello","world"];
for x.each |y| {
io::println(y);
}
}
I get the following error
amitava:l2 amitava$ make
rustc -g hello.rs
hello.rs:4:16: 4:17 error: mismatched types: expected `&/str` but found
`&&static/str` (expected &/str but found &-ptr)
hello.rs:4 io::println(y);
^
error: aborting due to previous error
make: *** [hello] Error 101
What am I missing?
Thanks & Regards,
Amitava Shee
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev