1
1
error[E0658]: `if` is not allowed in a `const`
2
- --> $DIR/feature-gate-const-if-match.rs:11 :16
2
+ --> $DIR/feature-gate-const-if-match.rs:10 :16
3
3
|
4
4
LL | const _: i32 = if true {
5
5
| ________________^
@@ -13,7 +13,7 @@ LL | | };
13
13
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
14
14
15
15
error[E0658]: `if` is not allowed in a `const`
16
- --> $DIR/feature-gate-const-if-match.rs:17 :16
16
+ --> $DIR/feature-gate-const-if-match.rs:16 :16
17
17
|
18
18
LL | const _: i32 = if let Some(true) = Some(false) {
19
19
| ________________^
@@ -27,7 +27,7 @@ LL | | };
27
27
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
28
28
29
29
error[E0658]: `match` is not allowed in a `const`
30
- --> $DIR/feature-gate-const-if-match.rs:23 :16
30
+ --> $DIR/feature-gate-const-if-match.rs:22 :16
31
31
|
32
32
LL | const _: i32 = match 1 {
33
33
| ________________^
@@ -41,7 +41,7 @@ LL | | };
41
41
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
42
42
43
43
error[E0658]: `if` is not allowed in a `static`
44
- --> $DIR/feature-gate-const-if-match.rs:30 :13
44
+ --> $DIR/feature-gate-const-if-match.rs:29 :13
45
45
|
46
46
LL | let x = if true { 0 } else { 1 };
47
47
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -50,7 +50,7 @@ LL | let x = if true { 0 } else { 1 };
50
50
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
51
51
52
52
error[E0658]: `match` is not allowed in a `static`
53
- --> $DIR/feature-gate-const-if-match.rs:32 :13
53
+ --> $DIR/feature-gate-const-if-match.rs:31 :13
54
54
|
55
55
LL | let x = match x { 0 => 1, _ => 0 };
56
56
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -59,7 +59,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
59
59
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
60
60
61
61
error[E0658]: `if` is not allowed in a `static`
62
- --> $DIR/feature-gate-const-if-match.rs:34 :5
62
+ --> $DIR/feature-gate-const-if-match.rs:33 :5
63
63
|
64
64
LL | if let Some(x) = Some(x) { x } else { 1 }
65
65
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
68
68
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
69
69
70
70
error[E0658]: `if` is not allowed in a `static mut`
71
- --> $DIR/feature-gate-const-if-match.rs:39 :13
71
+ --> $DIR/feature-gate-const-if-match.rs:38 :13
72
72
|
73
73
LL | let x = if true { 0 } else { 1 };
74
74
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -77,7 +77,7 @@ LL | let x = if true { 0 } else { 1 };
77
77
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
78
78
79
79
error[E0658]: `match` is not allowed in a `static mut`
80
- --> $DIR/feature-gate-const-if-match.rs:41 :13
80
+ --> $DIR/feature-gate-const-if-match.rs:40 :13
81
81
|
82
82
LL | let x = match x { 0 => 1, _ => 0 };
83
83
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -86,7 +86,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
86
86
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
87
87
88
88
error[E0658]: `if` is not allowed in a `static mut`
89
- --> $DIR/feature-gate-const-if-match.rs:43 :5
89
+ --> $DIR/feature-gate-const-if-match.rs:42 :5
90
90
|
91
91
LL | if let Some(x) = Some(x) { x } else { 1 }
92
92
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -95,7 +95,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
95
95
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
96
96
97
97
error[E0658]: `if` is not allowed in a `const fn`
98
- --> $DIR/feature-gate-const-if-match.rs:48 :5
98
+ --> $DIR/feature-gate-const-if-match.rs:47 :5
99
99
|
100
100
LL | if true { 5 } else { 6 }
101
101
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -104,7 +104,7 @@ LL | if true { 5 } else { 6 }
104
104
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
105
105
106
106
error[E0658]: `if` is not allowed in a `const fn`
107
- --> $DIR/feature-gate-const-if-match.rs:52 :5
107
+ --> $DIR/feature-gate-const-if-match.rs:51 :5
108
108
|
109
109
LL | / if let Some(true) = a {
110
110
LL | | 0
@@ -117,7 +117,7 @@ LL | | }
117
117
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
118
118
119
119
error[E0658]: `match` is not allowed in a `const fn`
120
- --> $DIR/feature-gate-const-if-match.rs:60 :5
120
+ --> $DIR/feature-gate-const-if-match.rs:59 :5
121
121
|
122
122
LL | / match i {
123
123
LL | | i if i > 10 => i,
@@ -130,7 +130,7 @@ LL | | }
130
130
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
131
131
132
132
error[E0658]: `if` is not allowed in a `const fn`
133
- --> $DIR/feature-gate-const-if-match.rs:91 :17
133
+ --> $DIR/feature-gate-const-if-match.rs:90 :17
134
134
|
135
135
LL | let x = if y { 0 } else { 1 };
136
136
| ^^^^^^^^^^^^^^^^^^^^^
@@ -139,7 +139,7 @@ LL | let x = if y { 0 } else { 1 };
139
139
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
140
140
141
141
error[E0658]: `match` is not allowed in a `const fn`
142
- --> $DIR/feature-gate-const-if-match.rs:93 :17
142
+ --> $DIR/feature-gate-const-if-match.rs:92 :17
143
143
|
144
144
LL | let x = match x { 0 => 1, _ => 0 };
145
145
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -148,7 +148,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
148
148
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
149
149
150
150
error[E0658]: `if` is not allowed in a `const fn`
151
- --> $DIR/feature-gate-const-if-match.rs:95 :9
151
+ --> $DIR/feature-gate-const-if-match.rs:94 :9
152
152
|
153
153
LL | if let Some(x) = Some(x) { x } else { 1 }
154
154
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
157
157
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
158
158
159
159
error[E0658]: `if` is not allowed in a `const`
160
- --> $DIR/feature-gate-const-if-match.rs:111 :17
160
+ --> $DIR/feature-gate-const-if-match.rs:110 :17
161
161
|
162
162
LL | let x = if false { 0 } else { 1 };
163
163
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -166,7 +166,7 @@ LL | let x = if false { 0 } else { 1 };
166
166
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
167
167
168
168
error[E0658]: `match` is not allowed in a `const`
169
- --> $DIR/feature-gate-const-if-match.rs:113 :17
169
+ --> $DIR/feature-gate-const-if-match.rs:112 :17
170
170
|
171
171
LL | let x = match x { 0 => 1, _ => 0 };
172
172
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -175,7 +175,7 @@ LL | let x = match x { 0 => 1, _ => 0 };
175
175
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
176
176
177
177
error[E0658]: `if` is not allowed in a `const`
178
- --> $DIR/feature-gate-const-if-match.rs:115 :9
178
+ --> $DIR/feature-gate-const-if-match.rs:114 :9
179
179
|
180
180
LL | if let Some(x) = Some(x) { x } else { 1 }
181
181
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -184,7 +184,7 @@ LL | if let Some(x) = Some(x) { x } else { 1 }
184
184
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
185
185
186
186
error[E0658]: `if` is not allowed in a `const`
187
- --> $DIR/feature-gate-const-if-match.rs:68 :21
187
+ --> $DIR/feature-gate-const-if-match.rs:67 :21
188
188
|
189
189
LL | const IF: i32 = if true { 5 } else { 6 };
190
190
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -193,7 +193,7 @@ LL | const IF: i32 = if true { 5 } else { 6 };
193
193
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
194
194
195
195
error[E0658]: `if` is not allowed in a `const`
196
- --> $DIR/feature-gate-const-if-match.rs:71 :25
196
+ --> $DIR/feature-gate-const-if-match.rs:70 :25
197
197
|
198
198
LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
199
199
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -202,7 +202,7 @@ LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
202
202
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
203
203
204
204
error[E0658]: `match` is not allowed in a `const`
205
- --> $DIR/feature-gate-const-if-match.rs:74 :24
205
+ --> $DIR/feature-gate-const-if-match.rs:73 :24
206
206
|
207
207
LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
208
208
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -211,7 +211,7 @@ LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
211
211
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
212
212
213
213
error[E0658]: `if` is not allowed in a `const`
214
- --> $DIR/feature-gate-const-if-match.rs:79 :21
214
+ --> $DIR/feature-gate-const-if-match.rs:78 :21
215
215
|
216
216
LL | const IF: i32 = if true { 5 } else { 6 };
217
217
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -220,7 +220,7 @@ LL | const IF: i32 = if true { 5 } else { 6 };
220
220
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
221
221
222
222
error[E0658]: `if` is not allowed in a `const`
223
- --> $DIR/feature-gate-const-if-match.rs:82 :25
223
+ --> $DIR/feature-gate-const-if-match.rs:81 :25
224
224
|
225
225
LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
226
226
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -229,7 +229,7 @@ LL | const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
229
229
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
230
230
231
231
error[E0658]: `match` is not allowed in a `const`
232
- --> $DIR/feature-gate-const-if-match.rs:85 :24
232
+ --> $DIR/feature-gate-const-if-match.rs:84 :24
233
233
|
234
234
LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
235
235
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -238,7 +238,7 @@ LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
238
238
= help: add `#![feature(const_if_match)]` to the crate attributes to enable
239
239
240
240
error[E0019]: constant contains unimplemented expression type
241
- --> $DIR/feature-gate-const-if-match.rs:115 :21
241
+ --> $DIR/feature-gate-const-if-match.rs:114 :21
242
242
|
243
243
LL | if let Some(x) = Some(x) { x } else { 1 }
244
244
| ^
0 commit comments