File tree Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Expand file tree Collapse file tree 3 files changed +8
-8
lines changed Original file line number Diff line number Diff line change 1
1
fn matcher ( x : option < int > ) {
2
- alt x {
2
+ match x {
3
3
ref some( i) => { } //~ ERROR expected identifier, found enum pattern
4
4
none => { }
5
5
}
Original file line number Diff line number Diff line change @@ -3,39 +3,39 @@ enum opts {
3
3
}
4
4
5
5
fn matcher1 ( x : opts ) {
6
- alt x {
6
+ match x {
7
7
a( ref i) | b( copy i) => { } //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
8
8
c( _) => { }
9
9
}
10
10
}
11
11
12
12
fn matcher2 ( x : opts ) {
13
- alt x {
13
+ match x {
14
14
a( ref i) | b( i) => { } //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
15
15
c( _) => { }
16
16
}
17
17
}
18
18
19
19
fn matcher3 ( x : opts ) {
20
- alt x {
20
+ match x {
21
21
a( ref mut i) | b( ref const i) => { } //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
22
22
c( _) => { }
23
23
}
24
24
}
25
25
26
26
fn matcher4 ( x : opts ) {
27
- alt x {
27
+ match x {
28
28
a( ref mut i) | b( ref i) => { } //~ ERROR variable `i` is bound with different mode in pattern #2 than in pattern #1
29
29
c( _) => { }
30
30
}
31
31
}
32
32
33
33
34
34
fn matcher5 ( x : opts ) {
35
- alt x {
35
+ match x {
36
36
a( ref i) | b( ref i) => { }
37
37
c( _) => { }
38
38
}
39
39
}
40
40
41
- fn main ( ) { }
41
+ fn main ( ) { }
Original file line number Diff line number Diff line change 1
1
fn main ( ) {
2
2
let y = 1 ;
3
- alt y {
3
+ match y {
4
4
a | b => { } //~ ERROR variable `a` from pattern #1 is not bound in pattern #2
5
5
//~^ ERROR variable `b` from pattern #2 is not bound in pattern #1
6
6
}
You can’t perform that action at this time.
0 commit comments