summary refs log tree commit diff
path: root/tests/ui/rfcs/rfc-2294-if-let-guard/feature-gate.stderr
blob: 759f14783509a9b02d5a903c9ed66d4b17757425 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:10:16
   |
LL |         () if (let 0 = 1) => {}
   |                ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:10:16
   |
LL |         () if (let 0 = 1) => {}
   |                ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:13:18
   |
LL |         () if (((let 0 = 1))) => {}
   |                  ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:13:18
   |
LL |         () if (((let 0 = 1))) => {}
   |                  ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:22:16
   |
LL |         () if (let 0 = 1) && true => {}
   |                ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:22:16
   |
LL |         () if (let 0 = 1) && true => {}
   |                ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:25:24
   |
LL |         () if true && (let 0 = 1) => {}
   |                        ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:25:24
   |
LL |         () if true && (let 0 = 1) => {}
   |                        ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:28:16
   |
LL |         () if (let 0 = 1) && (let 0 = 1) => {}
   |                ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:28:16
   |
LL |         () if (let 0 = 1) && (let 0 = 1) => {}
   |                ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:28:31
   |
LL |         () if (let 0 = 1) && (let 0 = 1) => {}
   |                               ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:28:31
   |
LL |         () if (let 0 = 1) && (let 0 = 1) => {}
   |                               ^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:32:42
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                          ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:32:42
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:32:55
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                                       ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:32:42
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:32:68
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                                                    ^^^^^^^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
note: `let`s wrapped in parentheses are not supported in a context with let chains
  --> $DIR/feature-gate.rs:32:42
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |                                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:55:16
   |
LL |     use_expr!((let 0 = 1 && 0 == 0));
   |                ^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:55:16
   |
LL |     use_expr!((let 0 = 1 && 0 == 0));
   |                ^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:58:16
   |
LL |     use_expr!((let 0 = 1));
   |                ^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions

error: expected expression, found `let` statement
  --> $DIR/feature-gate.rs:58:16
   |
LL |     use_expr!((let 0 = 1));
   |                ^^^
   |
   = note: only supported directly in conditions of `if` and `while` expressions
   = note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:7:12
   |
LL |         () if let 0 = 1 => {}
   |            ^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:16:12
   |
LL |         () if true && let 0 = 1 => {}
   |            ^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:19:12
   |
LL |         () if let 0 = 1 && true => {}
   |            ^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:32:12
   |
LL |         () if let 0 = 1 && let 1 = 2 && (let 2 = 3 && let 3 = 4 && let 4 = 5) => {}
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:39:12
   |
LL |         () if let Range { start: _, end: _ } = (true..true) && false => {}
   |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error[E0658]: `if let` guards are experimental
  --> $DIR/feature-gate.rs:63:12
   |
LL |         () if let 0 = 1 => {}
   |            ^^^^^^^^^^^^
   |
   = note: see issue #51114 <https://github.com/rust-lang/rust/issues/51114> for more information
   = help: add `#![feature(if_let_guard)]` to the crate attributes to enable
   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
   = help: you can write `if matches!(<expr>, <pattern>)` instead of `if let <pattern> = <expr>`

error: aborting due to 19 previous errors

For more information about this error, try `rustc --explain E0658`.