rust/src/test/compile-fail/borrowck-ref-into-rvalue.rs
2012-08-26 15:56:16 -07:00

12 lines
196 B
Rust

fn main() {
let msg;
match Some(~"Hello") { //~ ERROR illegal borrow
Some(ref m) => {
msg = m;
},
None => { fail }
}
io::println(*msg);
}