2012-05-30 12:01:08 -05:00
|
|
|
// exec-env:RUST_POISON_ON_FREE=1
|
|
|
|
|
|
|
|
fn switcher(x: option<@int>) {
|
|
|
|
let mut x = x;
|
|
|
|
alt x {
|
2012-08-03 21:59:04 -05:00
|
|
|
some(@y) => { copy y; x = none; }
|
|
|
|
none => { }
|
2012-05-30 12:01:08 -05:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
switcher(none);
|
|
|
|
switcher(some(@3));
|
|
|
|
}
|