a6a5c48c64
we now detect inconsistent modes, binding names, and various other errors. typeck/trans integration is mostly done. borrowck not so much. more tests needed.
10 lines
155 B
Rust
10 lines
155 B
Rust
fn destructure(x: option<int>) -> int {
|
|
alt x {
|
|
none => 0,
|
|
some(ref v) => *v
|
|
}
|
|
}
|
|
|
|
fn main() {
|
|
assert destructure(some(22)) == 22;
|
|
} |