2012-08-07 08:04:36 -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
|
|
|
|
2012-08-06 14:34:08 -05:00
|
|
|
match x {
|
2012-08-07 08:04:36 -05:00
|
|
|
{f: ref mut v} => {
|
|
|
|
impure(*v); //~ ERROR illegal borrow unless pure
|
2012-06-30 06:23:59 -05:00
|
|
|
//~^ NOTE impure due to access to impure function
|
2012-06-21 11:41:33 -05:00
|
|
|
}
|
|
|
|
}
|
2012-08-07 08:04:36 -05:00
|
|
|
}
|