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