We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c0e988f commit 4a216a0Copy full SHA for 4a216a0
src/test/run-pass/alt-ref-binding-mut.rs
@@ -3,7 +3,7 @@ type rec = {
3
};
4
5
fn destructure(x: &mut rec) {
6
- alt *x {
+ match *x {
7
{f: ref mut f} => *f += 1
8
}
9
@@ -12,4 +12,4 @@ fn main() {
12
let mut v = {f: 22};
13
destructure(&mut v);
14
assert v.f == 23;
15
-}
+}
src/test/run-pass/alt-ref-binding.rs
@@ -1,10 +1,10 @@
1
fn destructure(x: option<int>) -> int {
2
- alt x {
+ match x {
none => 0,
some(ref v) => *v
fn main() {
assert destructure(some(22)) == 22;
10
0 commit comments