11error: unexpected parentheses surrounding `match` arm pattern
2- --> $DIR/feature-gate-guard-patterns.rs:10 :9
2+ --> $DIR/feature-gate-guard-patterns.rs:12 :9
33 |
44LL | (0 if guard(0)) => {},
55 | ^ ^
@@ -11,7 +11,7 @@ LL + 0 if guard(0) => {},
1111 |
1212
1313error[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
1515 |
1616LL | let ((x if guard(x)) | x) = 0;
1717 | ^ not found in this scope
@@ -23,13 +23,13 @@ LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {
2323 | ^
2424 |
2525help: 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
2727 |
2828LL | let ((x if guard(x)) | x) = 0;
2929 | ^
3030
3131error[E0658]: guard patterns are experimental
32- --> $DIR/feature-gate-guard-patterns.rs:16 :15
32+ --> $DIR/feature-gate-guard-patterns.rs:18 :15
3333 |
3434LL | (0 if guard(0)) | 1 => {},
3535 | ^^^^^^^^
@@ -40,7 +40,7 @@ LL | (0 if guard(0)) | 1 => {},
4040 = help: consider using match arm guards
4141
4242error[E0658]: guard patterns are experimental
43- --> $DIR/feature-gate-guard-patterns.rs:21 :16
43+ --> $DIR/feature-gate-guard-patterns.rs:23 :16
4444 |
4545LL | let ((x if guard(x)) | x) = 0;
4646 | ^^^^^^^^
@@ -51,7 +51,7 @@ LL | let ((x if guard(x)) | x) = 0;
5151 = help: consider using match arm guards
5252
5353error[E0658]: guard patterns are experimental
54- --> $DIR/feature-gate-guard-patterns.rs:25 :18
54+ --> $DIR/feature-gate-guard-patterns.rs:27 :18
5555 |
5656LL | if let (x if guard(x)) = 0 {}
5757 | ^^^^^^^^
@@ -62,7 +62,7 @@ LL | if let (x if guard(x)) = 0 {}
6262 = help: consider using match arm guards
6363
6464error[E0658]: guard patterns are experimental
65- --> $DIR/feature-gate-guard-patterns.rs:29 :21
65+ --> $DIR/feature-gate-guard-patterns.rs:30 :21
6666 |
6767LL | while let (x if guard(x)) = 0 {}
6868 | ^^^^^^^^
@@ -94,26 +94,7 @@ LL | fn even_as_function_parameters(((x if guard(x), _) | (_, x)): (i32, i32)) {
9494 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
9595 = help: consider using match arm guards
9696
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
11798
11899Some errors have detailed explanations: E0425, E0658.
119100For more information about an error, try `rustc --explain E0425`.
0 commit comments