2012-06-20 20:08:25 -07:00
|
|
|
fn main() {
|
2012-08-20 12:23:37 -07:00
|
|
|
let x = Some(~1);
|
2012-08-06 12:34:08 -07:00
|
|
|
match x { //~ NOTE loan of immutable local variable granted here
|
2012-08-20 12:23:37 -07:00
|
|
|
Some(ref _y) => {
|
2012-10-23 11:11:23 -07:00
|
|
|
let _a = move x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
|
2012-06-20 20:08:25 -07:00
|
|
|
}
|
2012-08-03 19:59:04 -07:00
|
|
|
_ => {}
|
2012-06-20 20:08:25 -07:00
|
|
|
}
|
|
|
|
}
|