2018-09-04 12:05:53 +02:00
|
|
|
// run-pass
|
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
struct F { f: Vec<isize> }
|
2013-01-25 22:46:32 -08:00
|
|
|
|
2015-03-25 17:06:52 -07:00
|
|
|
fn impure(_v: &[isize]) {
|
2012-06-21 09:41:33 -07:00
|
|
|
}
|
|
|
|
|
2013-02-01 19:43:17 -08:00
|
|
|
pub fn main() {
|
2016-10-29 22:54:04 +01:00
|
|
|
let mut x = F {f: vec![3]};
|
2012-06-21 09:41:33 -07:00
|
|
|
|
2012-08-06 12:34:08 -07:00
|
|
|
match x {
|
2013-01-25 22:46:32 -08:00
|
|
|
F {f: ref mut v} => {
|
2015-02-01 21:53:25 -05:00
|
|
|
impure(v);
|
2012-06-21 09:41:33 -07:00
|
|
|
}
|
|
|
|
}
|
2012-08-07 06:04:36 -07:00
|
|
|
}
|