s/alt/match/... again.
This commit is contained in:
parent
4a216a000a
commit
0308884416
@ -1,5 +1,5 @@
|
||||
fn matcher(x: option<int>) {
|
||||
alt x {
|
||||
match x {
|
||||
ref some(i) => {} //~ ERROR expected identifier, found enum pattern
|
||||
none => {}
|
||||
}
|
||||
|
@ -3,28 +3,28 @@ enum opts {
|
||||
}
|
||||
|
||||
fn matcher1(x: opts) {
|
||||
alt x {
|
||||
match x {
|
||||
a(ref i) | b(copy i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
||||
c(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn matcher2(x: opts) {
|
||||
alt x {
|
||||
match x {
|
||||
a(ref i) | b(i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
||||
c(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn matcher3(x: opts) {
|
||||
alt x {
|
||||
match x {
|
||||
a(ref mut i) | b(ref const i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
||||
c(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn matcher4(x: opts) {
|
||||
alt x {
|
||||
match x {
|
||||
a(ref mut i) | b(ref i) => {} //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
|
||||
c(_) => {}
|
||||
}
|
||||
@ -32,10 +32,10 @@ fn matcher4(x: opts) {
|
||||
|
||||
|
||||
fn matcher5(x: opts) {
|
||||
alt x {
|
||||
match x {
|
||||
a(ref i) | b(ref i) => {}
|
||||
c(_) => {}
|
||||
}
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
fn main() {}
|
||||
|
@ -1,6 +1,6 @@
|
||||
fn main() {
|
||||
let y = 1;
|
||||
alt y {
|
||||
match y {
|
||||
a | b => {} //~ ERROR variable `a` from pattern #1 is not bound in pattern #2
|
||||
//~^ ERROR variable `b` from pattern #2 is not bound in pattern #1
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user