]> git.lizzy.rs Git - rust.git/blob - src/test/ui/consts/control-flow/feature-gate-const-if-match.stock.stderr
Rollup merge of #67267 - alexcrichton:update-wasi-libc, r=Dylan-DPC
[rust.git] / src / test / ui / consts / control-flow / feature-gate-const-if-match.stock.stderr
1 error[E0658]: `if` is not allowed in a `const`
2   --> $DIR/feature-gate-const-if-match.rs:11:16
3    |
4 LL |   const _: i32 = if true {
5    |  ________________^
6 LL | |     5
7 LL | | } else {
8 LL | |     6
9 LL | | };
10    | |_^
11    |
12    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
13    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
14
15 error[E0658]: `if` is not allowed in a `const`
16   --> $DIR/feature-gate-const-if-match.rs:17:16
17    |
18 LL |   const _: i32 = if let Some(true) = Some(false) {
19    |  ________________^
20 LL | |     0
21 LL | | } else {
22 LL | |     1
23 LL | | };
24    | |_^
25    |
26    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
27    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
28
29 error[E0658]: `match` is not allowed in a `const`
30   --> $DIR/feature-gate-const-if-match.rs:23:16
31    |
32 LL |   const _: i32 = match 1 {
33    |  ________________^
34 LL | |     2 => 3,
35 LL | |     4 => 5,
36 LL | |     _ => 0,
37 LL | | };
38    | |_^
39    |
40    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
41    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
42
43 error[E0658]: `if` is not allowed in a `static`
44   --> $DIR/feature-gate-const-if-match.rs:30:13
45    |
46 LL |     let x = if true { 0 } else { 1 };
47    |             ^^^^^^^^^^^^^^^^^^^^^^^^
48    |
49    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
50    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
51
52 error[E0658]: `match` is not allowed in a `static`
53   --> $DIR/feature-gate-const-if-match.rs:32:13
54    |
55 LL |     let x = match x { 0 => 1, _ => 0 };
56    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
57    |
58    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
59    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
60
61 error[E0658]: `if` is not allowed in a `static`
62   --> $DIR/feature-gate-const-if-match.rs:34:5
63    |
64 LL |     if let Some(x) = Some(x) { x } else { 1 }
65    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66    |
67    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
68    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
69
70 error[E0658]: `if` is not allowed in a `static mut`
71   --> $DIR/feature-gate-const-if-match.rs:39:13
72    |
73 LL |     let x = if true { 0 } else { 1 };
74    |             ^^^^^^^^^^^^^^^^^^^^^^^^
75    |
76    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
77    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
78
79 error[E0658]: `match` is not allowed in a `static mut`
80   --> $DIR/feature-gate-const-if-match.rs:41:13
81    |
82 LL |     let x = match x { 0 => 1, _ => 0 };
83    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^
84    |
85    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
86    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
87
88 error[E0658]: `if` is not allowed in a `static mut`
89   --> $DIR/feature-gate-const-if-match.rs:43:5
90    |
91 LL |     if let Some(x) = Some(x) { x } else { 1 }
92    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
93    |
94    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
95    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
96
97 error[E0658]: `if` is not allowed in a `const fn`
98   --> $DIR/feature-gate-const-if-match.rs:48:5
99    |
100 LL |     if true { 5 } else { 6 }
101    |     ^^^^^^^^^^^^^^^^^^^^^^^^
102    |
103    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
104    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
105
106 error[E0658]: `if` is not allowed in a `const fn`
107   --> $DIR/feature-gate-const-if-match.rs:52:5
108    |
109 LL | /     if let Some(true) = a {
110 LL | |         0
111 LL | |     } else {
112 LL | |         1
113 LL | |     }
114    | |_____^
115    |
116    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
117    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
118
119 error[E0658]: `match` is not allowed in a `const fn`
120   --> $DIR/feature-gate-const-if-match.rs:60:5
121    |
122 LL | /     match i {
123 LL | |         i if i > 10 => i,
124 LL | |         1 => 2,
125 LL | |         _ => 0
126 LL | |     }
127    | |_____^
128    |
129    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
130    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
131
132 error[E0658]: `if` is not allowed in a `const fn`
133   --> $DIR/feature-gate-const-if-match.rs:91:17
134    |
135 LL |         let x = if y { 0 } else { 1 };
136    |                 ^^^^^^^^^^^^^^^^^^^^^
137    |
138    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
139    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
140
141 error[E0658]: `match` is not allowed in a `const fn`
142   --> $DIR/feature-gate-const-if-match.rs:93:17
143    |
144 LL |         let x = match x { 0 => 1, _ => 0 };
145    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
146    |
147    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
148    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
149
150 error[E0658]: `if` is not allowed in a `const fn`
151   --> $DIR/feature-gate-const-if-match.rs:95:9
152    |
153 LL |         if let Some(x) = Some(x) { x } else { 1 }
154    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
155    |
156    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
157    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
158
159 error[E0658]: `if` is not allowed in a `const`
160   --> $DIR/feature-gate-const-if-match.rs:111:17
161    |
162 LL |         let x = if false { 0 } else { 1 };
163    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^
164    |
165    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
166    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
167
168 error[E0658]: `match` is not allowed in a `const`
169   --> $DIR/feature-gate-const-if-match.rs:113:17
170    |
171 LL |         let x = match x { 0 => 1, _ => 0 };
172    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^
173    |
174    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
175    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
176
177 error[E0658]: `if` is not allowed in a `const`
178   --> $DIR/feature-gate-const-if-match.rs:115:9
179    |
180 LL |         if let Some(x) = Some(x) { x } else { 1 }
181    |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
182    |
183    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
184    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
185
186 error[E0658]: `if` is not allowed in a `const`
187   --> $DIR/feature-gate-const-if-match.rs:68:21
188    |
189 LL |     const IF: i32 = if true { 5 } else { 6 };
190    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
191    |
192    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
193    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
194
195 error[E0658]: `if` is not allowed in a `const`
196   --> $DIR/feature-gate-const-if-match.rs:71:25
197    |
198 LL |     const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
199    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200    |
201    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
202    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
203
204 error[E0658]: `match` is not allowed in a `const`
205   --> $DIR/feature-gate-const-if-match.rs:74:24
206    |
207 LL |     const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
208    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
209    |
210    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
211    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
212
213 error[E0658]: `if` is not allowed in a `const`
214   --> $DIR/feature-gate-const-if-match.rs:79:21
215    |
216 LL |     const IF: i32 = if true { 5 } else { 6 };
217    |                     ^^^^^^^^^^^^^^^^^^^^^^^^
218    |
219    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
220    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
221
222 error[E0658]: `if` is not allowed in a `const`
223   --> $DIR/feature-gate-const-if-match.rs:82:25
224    |
225 LL |     const IF_LET: i32 = if let Some(true) = None { 5 } else { 6 };
226    |                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227    |
228    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
229    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
230
231 error[E0658]: `match` is not allowed in a `const`
232   --> $DIR/feature-gate-const-if-match.rs:85:24
233    |
234 LL |     const MATCH: i32 = match 0 { 1 => 2, _ => 0 };
235    |                        ^^^^^^^^^^^^^^^^^^^^^^^^^^
236    |
237    = note: for more information, see https://github.com/rust-lang/rust/issues/49146
238    = help: add `#![feature(const_if_match)]` to the crate attributes to enable
239
240 error[E0019]: constant contains unimplemented expression type
241   --> $DIR/feature-gate-const-if-match.rs:115:21
242    |
243 LL |         if let Some(x) = Some(x) { x } else { 1 }
244    |                     ^
245
246 error: aborting due to 25 previous errors
247
248 Some errors have detailed explanations: E0019, E0658.
249 For more information about an error, try `rustc --explain E0019`.