2012-05-16 14:43:57 -05:00
|
|
|
// xfail-fast (compile-flags unsupported on windows)
|
2012-04-26 18:02:01 -05:00
|
|
|
// compile-flags:--borrowck=err
|
|
|
|
|
|
|
|
fn match_imm_box(v: &const @option<int>) -> int {
|
|
|
|
alt *v {
|
|
|
|
@some(i) {i}
|
|
|
|
@none {0}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn match_const_box(v: &const @const option<int>) -> int {
|
|
|
|
alt *v {
|
|
|
|
@some(i) {
|
|
|
|
//!^ ERROR enum variant in aliasable, mutable location
|
|
|
|
i
|
|
|
|
}
|
|
|
|
@none {0}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
fn main() {
|
|
|
|
}
|