rust/src/test/run-pass/let-assignability.rs
2012-11-14 11:26:00 -08:00

19 lines
190 B
Rust

fn f() {
let a = ~"hello";
let b: &str = a;
io::println(b);
}
fn g() {
let c = ~"world";
let d: &str;
d = c;
io::println(d);
}
fn main() {
f();
g();
}