2012-06-29 18:26:56 -05:00
|
|
|
fn impure(_v: ~[int]) {
|
2012-06-21 11:41:33 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-06-29 18:26:56 -05:00
|
|
|
let x = {mut f: ~[3]};
|
2012-06-21 11:41:33 -05:00
|
|
|
|
|
|
|
alt x {
|
|
|
|
{f: v} => {
|
2012-06-30 06:23:59 -05:00
|
|
|
impure(v); //~ ERROR illegal borrow unless pure: unique value in aliasable, mutable location
|
|
|
|
//~^ NOTE impure due to access to impure function
|
2012-06-21 11:41:33 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|