1
1
error: unexpected parentheses surrounding `match` arm pattern
2
- --> $DIR/feature-gate-guard-patterns.rs:10 :9
2
+ --> $DIR/feature-gate-guard-patterns.rs:12 :9
3
3
|
4
4
LL | (0 if guard(0)) => {},
5
5
| ^ ^
@@ -11,7 +11,7 @@ LL + 0 if guard(0) => {},
11
11
|
12
12
13
13
error[E0425]: cannot find value `x` in this scope
14
- --> $DIR/feature-gate-guard-patterns.rs:21 :22
14
+ --> $DIR/feature-gate-guard-patterns.rs:23 :22
15
15
|
16
16
LL | let ((x if guard(x)) | x) = 0;
17
17
| ^ not found in this scope
@@ -23,13 +23,13 @@ LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {
23
23
| ^
24
24
|
25
25
help: the binding `x` is available in a different scope in the same function
26
- --> $DIR/feature-gate-guard-patterns.rs:21 :11
26
+ --> $DIR/feature-gate-guard-patterns.rs:23 :11
27
27
|
28
28
LL | let ((x if guard(x)) | x) = 0;
29
29
| ^
30
30
31
31
error[E0658]: guard patterns are experimental
32
- --> $DIR/feature-gate-guard-patterns.rs:16 :15
32
+ --> $DIR/feature-gate-guard-patterns.rs:18 :15
33
33
|
34
34
LL | (0 if guard(0)) | 1 => {},
35
35
| ^^^^^^^^
@@ -40,7 +40,7 @@ LL | (0 if guard(0)) | 1 => {},
40
40
= help: consider using match arm guards
41
41
42
42
error[E0658]: guard patterns are experimental
43
- --> $DIR/feature-gate-guard-patterns.rs:21 :16
43
+ --> $DIR/feature-gate-guard-patterns.rs:23 :16
44
44
|
45
45
LL | let ((x if guard(x)) | x) = 0;
46
46
| ^^^^^^^^
@@ -51,7 +51,7 @@ LL | let ((x if guard(x)) | x) = 0;
51
51
= help: consider using match arm guards
52
52
53
53
error[E0658]: guard patterns are experimental
54
- --> $DIR/feature-gate-guard-patterns.rs:25 :18
54
+ --> $DIR/feature-gate-guard-patterns.rs:27 :18
55
55
|
56
56
LL | if let (x if guard(x)) = 0 {}
57
57
| ^^^^^^^^
@@ -62,7 +62,7 @@ LL | if let (x if guard(x)) = 0 {}
62
62
= help: consider using match arm guards
63
63
64
64
error[E0658]: guard patterns are experimental
65
- --> $DIR/feature-gate-guard-patterns.rs:29 :21
65
+ --> $DIR/feature-gate-guard-patterns.rs:30 :21
66
66
|
67
67
LL | while let (x if guard(x)) = 0 {}
68
68
| ^^^^^^^^
@@ -94,26 +94,7 @@ LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {
94
94
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
95
95
= help: consider using match arm guards
96
96
97
- warning: irrefutable `if let` pattern
98
- --> $DIR/feature-gate-guard-patterns.rs:25:8
99
- |
100
- LL | if let (x if guard(x)) = 0 {}
101
- | ^^^^^^^^^^^^^^^^^^^^^^^
102
- |
103
- = note: this pattern will always match, so the `if let` is useless
104
- = help: consider replacing the `if let` with a `let`
105
- = note: `#[warn(irrefutable_let_patterns)]` on by default
106
-
107
- warning: irrefutable `while let` pattern
108
- --> $DIR/feature-gate-guard-patterns.rs:29:11
109
- |
110
- LL | while let (x if guard(x)) = 0 {}
111
- | ^^^^^^^^^^^^^^^^^^^^^^^
112
- |
113
- = note: this pattern will always match, so the loop will never exit
114
- = help: consider instead using a `loop { ... }` with a `let` inside it
115
-
116
- error: aborting due to 9 previous errors; 2 warnings emitted
97
+ error: aborting due to 9 previous errors
117
98
118
99
Some errors have detailed explanations: E0425, E0658.
119
100
For more information about an error, try `rustc --explain E0425`.
0 commit comments