2012-12-11 01:32:48 +00:00
|
|
|
// Copyright 2012 The Rust Project Developers. See the COPYRIGHT
|
|
|
|
// file at the top-level directory of this distribution and at
|
|
|
|
// http://rust-lang.org/COPYRIGHT.
|
|
|
|
//
|
|
|
|
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
|
|
|
|
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
|
|
|
|
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
|
|
|
|
// option. This file may not be copied, modified, or distributed
|
|
|
|
// except according to those terms.
|
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
struct F { f: Vec<isize> }
|
2013-01-26 06:46:32 +00:00
|
|
|
|
2015-03-26 00:06:52 +00:00
|
|
|
fn impure(_v: &[isize]) {
|
2012-06-21 16:41:33 +00:00
|
|
|
}
|
|
|
|
|
2013-02-02 03:43:17 +00:00
|
|
|
pub fn main() {
|
2016-10-29 21:54:04 +00:00
|
|
|
let mut x = F {f: vec![3]};
|
2012-06-21 16:41:33 +00:00
|
|
|
|
2012-08-06 19:34:08 +00:00
|
|
|
match x {
|
2013-01-26 06:46:32 +00:00
|
|
|
F {f: ref mut v} => {
|
2015-02-02 02:53:25 +00:00
|
|
|
impure(v);
|
2012-06-21 16:41:33 +00:00
|
|
|
}
|
|
|
|
}
|
2012-08-07 13:04:36 +00:00
|
|
|
}
|