2012-06-20 20:08:25 -07:00
|
|
|
fn main() {
|
|
|
|
let x = some(~1);
|
2012-06-30 12:23:59 +01:00
|
|
|
alt x { //~ NOTE loan of immutable local variable granted here
|
2012-06-20 20:08:25 -07:00
|
|
|
some(y) {
|
2012-06-30 12:23:59 +01:00
|
|
|
let _a <- x; //~ ERROR moving out of immutable local variable prohibited due to outstanding loan
|
2012-06-20 20:08:25 -07:00
|
|
|
}
|
|
|
|
_ {}
|
|
|
|
}
|
|
|
|
}
|