11error[E0658]: `if` is not allowed in a `const`
2- --> $DIR/feature-gate-const-if-match.rs:10 :16
2+ --> $DIR/feature-gate-const-if-match.rs:11 :16
33 |
44LL | const _: i32 = if true {
55 | ________________^
@@ -13,7 +13,7 @@ LL | | };
1313 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
1414
1515error[E0658]: `if` is not allowed in a `const`
16- --> $DIR/feature-gate-const-if-match.rs:16 :16
16+ --> $DIR/feature-gate-const-if-match.rs:17 :16
1717 |
1818LL | const _: i32 = if let Some(true) = Some(false) {
1919 | ________________^
@@ -27,7 +27,7 @@ LL | | };
2727 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
2828
2929error[E0658]: `match` is not allowed in a `const`
30- --> $DIR/feature-gate-const-if-match.rs:22 :16
30+ --> $DIR/feature-gate-const-if-match.rs:23 :16
3131 |
3232LL | const _: i32 = match 1 {
3333 | ________________^
@@ -41,7 +41,7 @@ LL | | };
4141 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
4242
4343error[E0658]: `if` is not allowed in a `static`
44- --> $DIR/feature-gate-const-if-match.rs:29 :13
44+ --> $DIR/feature-gate-const-if-match.rs:30 :13
4545 |
4646LL | let x = if true { 0 } else { 1 };
4747 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | let x = if true { 0 } else { 1 };
5050 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
5151
5252error[E0658]: `match` is not allowed in a `static`
53- --> $DIR/feature-gate-const-if-match.rs:31 :13
53+ --> $DIR/feature-gate-const-if-match.rs:32 :13
5454 |
5555LL | let x = match x { 0 => 1, _ => 0 };
5656 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
5959 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
6060
6161error[E0658]: `if` is not allowed in a `static`
62- --> $DIR/feature-gate-const-if-match.rs:33 :5
62+ --> $DIR/feature-gate-const-if-match.rs:34 :5
6363 |
6464LL | if let Some(x) = Some(x) { x } else { 1 }
6565 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
6868 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
6969
7070error[E0658]: `if` is not allowed in a `static mut`
71- --> $DIR/feature-gate-const-if-match.rs:38 :13
71+ --> $DIR/feature-gate-const-if-match.rs:39 :13
7272 |
7373LL | let x = if true { 0 } else { 1 };
7474 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -77,7 +77,7 @@ LL | let x = if true { 0 } else { 1 };
7777 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
7878
7979error[E0658]: `match` is not allowed in a `static mut`
80- --> $DIR/feature-gate-const-if-match.rs:40 :13
80+ --> $DIR/feature-gate-const-if-match.rs:41 :13
8181 |
8282LL | let x = match x { 0 => 1, _ => 0 };
8383 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -86,7 +86,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
8686 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
8787
8888error[E0658]: `if` is not allowed in a `static mut`
89- --> $DIR/feature-gate-const-if-match.rs:42 :5
89+ --> $DIR/feature-gate-const-if-match.rs:43 :5
9090 |
9191LL | if let Some(x) = Some(x) { x } else { 1 }
9292 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,7 +95,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
9595 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
9696
9797error[E0658]: `if` is not allowed in a `const fn`
98- --> $DIR/feature-gate-const-if-match.rs:47 :5
98+ --> $DIR/feature-gate-const-if-match.rs:48 :5
9999 |
100100LL | if true { 5 } else { 6 }
101101 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -104,7 +104,7 @@ LL | if true { 5 } else { 6 }
104104 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
105105
106106error[E0658]: `if` is not allowed in a `const fn`
107- --> $DIR/feature-gate-const-if-match.rs:51 :5
107+ --> $DIR/feature-gate-const-if-match.rs:52 :5
108108 |
109109LL | / if let Some(true) = a {
110110LL | | 0
@@ -117,7 +117,7 @@ LL | | }
117117 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
118118
119119error[E0658]: `match` is not allowed in a `const fn`
120- --> $DIR/feature-gate-const-if-match.rs:59 :5
120+ --> $DIR/feature-gate-const-if-match.rs:60 :5
121121 |
122122LL | / match i {
123123LL | | i if i > 10 => i,
@@ -130,7 +130,7 @@ LL | | }
130130 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
131131
132132error[E0658]: `if` is not allowed in a `const fn`
133- --> $DIR/feature-gate-const-if-match.rs:90 :17
133+ --> $DIR/feature-gate-const-if-match.rs:91 :17
134134 |
135135LL | let x = if y { 0 } else { 1 };
136136 | ^^^^^^^^^^^^^^^^^^^^^
@@ -139,7 +139,7 @@ LL | let x = if y { 0 } else { 1 };
139139 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
140140
141141error[E0658]: `match` is not allowed in a `const fn`
142- --> $DIR/feature-gate-const-if-match.rs:92 :17
142+ --> $DIR/feature-gate-const-if-match.rs:93 :17
143143 |
144144LL | let x = match x { 0 => 1, _ => 0 };
145145 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -148,7 +148,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
148148 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
149149
150150error[E0658]: `if` is not allowed in a `const fn`
151- --> $DIR/feature-gate-const-if-match.rs:94 :9
151+ --> $DIR/feature-gate-const-if-match.rs:95 :9
152152 |
153153LL | if let Some(x) = Some(x) { x } else { 1 }
154154 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
157157 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
158158
159159error[E0658]: `if` is not allowed in a `const`
160- --> $DIR/feature-gate-const-if-match.rs:110 :17
160+ --> $DIR/feature-gate-const-if-match.rs:111 :17
161161 |
162162LL | let x = if false { 0 } else { 1 };
163163 | ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ LL | let x = if false { 0 } else { 1 };
166166 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
167167
168168error[E0658]: `match` is not allowed in a `const`
169- --> $DIR/feature-gate-const-if-match.rs:112 :17
169+ --> $DIR/feature-gate-const-if-match.rs:113 :17
170170 |
171171LL | let x = match x { 0 => 1, _ => 0 };
172172 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -175,7 +175,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
175175 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
176176
177177error[E0658]: `if` is not allowed in a `const`
178- --> $DIR/feature-gate-const-if-match.rs:114 :9
178+ --> $DIR/feature-gate-const-if-match.rs:115 :9
179179 |
180180LL | if let Some(x) = Some(x) { x } else { 1 }
181181 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -184,7 +184,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
184184 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
185185
186186error[E0658]: `if` is not allowed in a `const`
187- --> $DIR/feature-gate-const-if-match.rs:67 :21
187+ --> $DIR/feature-gate-const-if-match.rs:68 :21
188188 |
189189LL | const IF: i32 = if true { 5 } else { 6 };
190190 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -193,7 +193,7 @@ LL | const IF: i32 = if true { 5 } else { 6 };
193193 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
194194
195195error[E0658]: `if` is not allowed in a `const`
196- --> $DIR/feature-gate-const-if-match.rs:70 :25
196+ --> $DIR/feature-gate-const-if-match.rs:71 :25
197197 |
198198LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
199199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -202,7 +202,7 @@ LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
202202 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
203203
204204error[E0658]: `match` is not allowed in a `const`
205- --> $DIR/feature-gate-const-if-match.rs:73 :24
205+ --> $DIR/feature-gate-const-if-match.rs:74 :24
206206 |
207207LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
208208 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -211,7 +211,7 @@ LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
211211 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
212212
213213error[E0658]: `if` is not allowed in a `const`
214- --> $DIR/feature-gate-const-if-match.rs:78 :21
214+ --> $DIR/feature-gate-const-if-match.rs:79 :21
215215 |
216216LL | const IF: i32 = if true { 5 } else { 6 };
217217 | ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -220,7 +220,7 @@ LL | const IF: i32 = if true { 5 } else { 6 };
220220 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
221221
222222error[E0658]: `if` is not allowed in a `const`
223- --> $DIR/feature-gate-const-if-match.rs:81 :25
223+ --> $DIR/feature-gate-const-if-match.rs:82 :25
224224 |
225225LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
226226 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -229,7 +229,7 @@ LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
229229 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
230230
231231error[E0658]: `match` is not allowed in a `const`
232- --> $DIR/feature-gate-const-if-match.rs:84 :24
232+ --> $DIR/feature-gate-const-if-match.rs:85 :24
233233 |
234234LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
235235 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -238,7 +238,7 @@ LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
238238 = help: add `#![feature(const_if_match)]` to the crate attributes to enable
239239
240240error[E0019]: constant contains unimplemented expression type
241- --> $DIR/feature-gate-const-if-match.rs:114 :21
241+ --> $DIR/feature-gate-const-if-match.rs:115 :21
242242 |
243243LL | if let Some(x) = Some(x) { x } else { 1 }
244244 | ^
0 commit comments