2012-05-30 12:01:08 -05:00
|
|
|
// exec-env:RUST_POISON_ON_FREE=1
|
|
|
|
|
2012-08-20 14:23:37 -05:00
|
|
|
fn switcher(x: Option<@int>) {
|
2012-05-30 12:01:08 -05:00
|
|
|
let mut x = x;
|
2012-08-06 14:34:08 -05:00
|
|
|
match x {
|
2012-08-20 14:23:37 -05:00
|
|
|
Some(@y) => { copy y; x = None; }
|
|
|
|
None => { }
|
2012-05-30 12:01:08 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
2012-08-20 14:23:37 -05:00
|
|
|
switcher(None);
|
|
|
|
switcher(Some(@3));
|
2012-05-30 12:01:08 -05:00
|
|
|
}
|