@@ -53,7 +53,7 @@ LL | let _: [u8; baz::<'b>(&())];
53
53
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
54
54
55
55
error: generic parameters may not be used in const operations
56
- --> $DIR/const-arg-in-const-arg.rs:26 :23
56
+ --> $DIR/const-arg-in-const-arg.rs:27 :23
57
57
|
58
58
LL | let _ = [0; bar::<N>()];
59
59
| ^ cannot perform const operation using `N`
@@ -62,7 +62,7 @@ LL | let _ = [0; bar::<N>()];
62
62
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
63
63
64
64
error: generic parameters may not be used in const operations
65
- --> $DIR/const-arg-in-const-arg.rs:28 :23
65
+ --> $DIR/const-arg-in-const-arg.rs:29 :23
66
66
|
67
67
LL | let _ = [0; faz::<'a>(&())];
68
68
| ^^ cannot perform const operation using `'a`
@@ -71,7 +71,7 @@ LL | let _ = [0; faz::<'a>(&())];
71
71
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
72
72
73
73
error: generic parameters may not be used in const operations
74
- --> $DIR/const-arg-in-const-arg.rs:30 :23
74
+ --> $DIR/const-arg-in-const-arg.rs:31 :23
75
75
|
76
76
LL | let _ = [0; baz::<'a>(&())];
77
77
| ^^ cannot perform const operation using `'a`
@@ -80,7 +80,7 @@ LL | let _ = [0; baz::<'a>(&())];
80
80
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
81
81
82
82
error: generic parameters may not be used in const operations
83
- --> $DIR/const-arg-in-const-arg.rs:31 :23
83
+ --> $DIR/const-arg-in-const-arg.rs:32 :23
84
84
|
85
85
LL | let _ = [0; faz::<'b>(&())];
86
86
| ^^ cannot perform const operation using `'b`
@@ -89,7 +89,7 @@ LL | let _ = [0; faz::<'b>(&())];
89
89
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
90
90
91
91
error: generic parameters may not be used in const operations
92
- --> $DIR/const-arg-in-const-arg.rs:33 :23
92
+ --> $DIR/const-arg-in-const-arg.rs:34 :23
93
93
|
94
94
LL | let _ = [0; baz::<'b>(&())];
95
95
| ^^ cannot perform const operation using `'b`
@@ -98,7 +98,7 @@ LL | let _ = [0; baz::<'b>(&())];
98
98
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
99
99
100
100
error: generic parameters may not be used in const operations
101
- --> $DIR/const-arg-in-const-arg.rs:34 :24
101
+ --> $DIR/const-arg-in-const-arg.rs:35 :24
102
102
|
103
103
LL | let _: Foo<{ foo::<T>() }>;
104
104
| ^ cannot perform const operation using `T`
@@ -107,7 +107,7 @@ LL | let _: Foo<{ foo::<T>() }>;
107
107
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
108
108
109
109
error: generic parameters may not be used in const operations
110
- --> $DIR/const-arg-in-const-arg.rs:35 :24
110
+ --> $DIR/const-arg-in-const-arg.rs:36 :24
111
111
|
112
112
LL | let _: Foo<{ bar::<N>() }>;
113
113
| ^ cannot perform const operation using `N`
@@ -116,7 +116,7 @@ LL | let _: Foo<{ bar::<N>() }>;
116
116
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
117
117
118
118
error: generic parameters may not be used in const operations
119
- --> $DIR/const-arg-in-const-arg.rs:37 :24
119
+ --> $DIR/const-arg-in-const-arg.rs:38 :24
120
120
|
121
121
LL | let _: Foo<{ faz::<'a>(&()) }>;
122
122
| ^^ cannot perform const operation using `'a`
@@ -125,7 +125,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>;
125
125
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
126
126
127
127
error: generic parameters may not be used in const operations
128
- --> $DIR/const-arg-in-const-arg.rs:39 :24
128
+ --> $DIR/const-arg-in-const-arg.rs:40 :24
129
129
|
130
130
LL | let _: Foo<{ baz::<'a>(&()) }>;
131
131
| ^^ cannot perform const operation using `'a`
@@ -134,7 +134,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>;
134
134
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
135
135
136
136
error: generic parameters may not be used in const operations
137
- --> $DIR/const-arg-in-const-arg.rs:40 :24
137
+ --> $DIR/const-arg-in-const-arg.rs:41 :24
138
138
|
139
139
LL | let _: Foo<{ faz::<'b>(&()) }>;
140
140
| ^^ cannot perform const operation using `'b`
@@ -143,7 +143,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>;
143
143
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
144
144
145
145
error: generic parameters may not be used in const operations
146
- --> $DIR/const-arg-in-const-arg.rs:42 :24
146
+ --> $DIR/const-arg-in-const-arg.rs:43 :24
147
147
|
148
148
LL | let _: Foo<{ baz::<'b>(&()) }>;
149
149
| ^^ cannot perform const operation using `'b`
@@ -152,7 +152,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>;
152
152
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
153
153
154
154
error: generic parameters may not be used in const operations
155
- --> $DIR/const-arg-in-const-arg.rs:43 :27
155
+ --> $DIR/const-arg-in-const-arg.rs:44 :27
156
156
|
157
157
LL | let _ = Foo::<{ foo::<T>() }>;
158
158
| ^ cannot perform const operation using `T`
@@ -161,7 +161,7 @@ LL | let _ = Foo::<{ foo::<T>() }>;
161
161
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
162
162
163
163
error: generic parameters may not be used in const operations
164
- --> $DIR/const-arg-in-const-arg.rs:44 :27
164
+ --> $DIR/const-arg-in-const-arg.rs:45 :27
165
165
|
166
166
LL | let _ = Foo::<{ bar::<N>() }>;
167
167
| ^ cannot perform const operation using `N`
@@ -170,7 +170,7 @@ LL | let _ = Foo::<{ bar::<N>() }>;
170
170
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
171
171
172
172
error: generic parameters may not be used in const operations
173
- --> $DIR/const-arg-in-const-arg.rs:46 :27
173
+ --> $DIR/const-arg-in-const-arg.rs:47 :27
174
174
|
175
175
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
176
176
| ^^ cannot perform const operation using `'a`
@@ -179,7 +179,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>;
179
179
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
180
180
181
181
error: generic parameters may not be used in const operations
182
- --> $DIR/const-arg-in-const-arg.rs:48 :27
182
+ --> $DIR/const-arg-in-const-arg.rs:49 :27
183
183
|
184
184
LL | let _ = Foo::<{ baz::<'a>(&()) }>;
185
185
| ^^ cannot perform const operation using `'a`
@@ -188,7 +188,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>;
188
188
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
189
189
190
190
error: generic parameters may not be used in const operations
191
- --> $DIR/const-arg-in-const-arg.rs:49 :27
191
+ --> $DIR/const-arg-in-const-arg.rs:50 :27
192
192
|
193
193
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
194
194
| ^^ cannot perform const operation using `'b`
@@ -197,7 +197,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>;
197
197
= help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
198
198
199
199
error: generic parameters may not be used in const operations
200
- --> $DIR/const-arg-in-const-arg.rs:51 :27
200
+ --> $DIR/const-arg-in-const-arg.rs:52 :27
201
201
|
202
202
LL | let _ = Foo::<{ baz::<'b>(&()) }>;
203
203
| ^^ cannot perform const operation using `'b`
@@ -241,7 +241,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
241
241
| ^^
242
242
243
243
error[E0747]: unresolved item provided when a constant was expected
244
- --> $DIR/const-arg-in-const-arg.rs:35 :24
244
+ --> $DIR/const-arg-in-const-arg.rs:36 :24
245
245
|
246
246
LL | let _: Foo<{ bar::<N>() }>;
247
247
| ^
@@ -252,7 +252,7 @@ LL | let _: Foo<{ bar::<{ N }>() }>;
252
252
| + +
253
253
254
254
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
255
- --> $DIR/const-arg-in-const-arg.rs:37 :24
255
+ --> $DIR/const-arg-in-const-arg.rs:38 :24
256
256
|
257
257
LL | let _: Foo<{ faz::<'a>(&()) }>;
258
258
| ^^
@@ -264,7 +264,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
264
264
| ^^
265
265
266
266
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
267
- --> $DIR/const-arg-in-const-arg.rs:40 :24
267
+ --> $DIR/const-arg-in-const-arg.rs:41 :24
268
268
|
269
269
LL | let _: Foo<{ faz::<'b>(&()) }>;
270
270
| ^^
@@ -283,8 +283,16 @@ LL | let _ = [0; foo::<T>()];
283
283
|
284
284
= note: this may fail depending on what value the parameter takes
285
285
286
+ error: constant expression depends on a generic parameter
287
+ --> $DIR/const-arg-in-const-arg.rs:25:13
288
+ |
289
+ LL | let _ = [0; foo::<T>()];
290
+ | ^^^^^^^^^^^^^^^
291
+ |
292
+ = note: this may fail depending on what value the parameter takes
293
+
286
294
error[E0747]: unresolved item provided when a constant was expected
287
- --> $DIR/const-arg-in-const-arg.rs:26 :23
295
+ --> $DIR/const-arg-in-const-arg.rs:27 :23
288
296
|
289
297
LL | let _ = [0; bar::<N>()];
290
298
| ^
@@ -295,7 +303,7 @@ LL | let _ = [0; bar::<{ N }>()];
295
303
| + +
296
304
297
305
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
298
- --> $DIR/const-arg-in-const-arg.rs:28 :23
306
+ --> $DIR/const-arg-in-const-arg.rs:29 :23
299
307
|
300
308
LL | let _ = [0; faz::<'a>(&())];
301
309
| ^^
@@ -307,7 +315,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
307
315
| ^^
308
316
309
317
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
310
- --> $DIR/const-arg-in-const-arg.rs:31 :23
318
+ --> $DIR/const-arg-in-const-arg.rs:32 :23
311
319
|
312
320
LL | let _ = [0; faz::<'b>(&())];
313
321
| ^^
@@ -319,7 +327,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
319
327
| ^^
320
328
321
329
error[E0747]: unresolved item provided when a constant was expected
322
- --> $DIR/const-arg-in-const-arg.rs:44 :27
330
+ --> $DIR/const-arg-in-const-arg.rs:45 :27
323
331
|
324
332
LL | let _ = Foo::<{ bar::<N>() }>;
325
333
| ^
@@ -330,7 +338,7 @@ LL | let _ = Foo::<{ bar::<{ N }>() }>;
330
338
| + +
331
339
332
340
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
333
- --> $DIR/const-arg-in-const-arg.rs:46 :27
341
+ --> $DIR/const-arg-in-const-arg.rs:47 :27
334
342
|
335
343
LL | let _ = Foo::<{ faz::<'a>(&()) }>;
336
344
| ^^
@@ -342,7 +350,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
342
350
| ^^
343
351
344
352
error[E0794]: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
345
- --> $DIR/const-arg-in-const-arg.rs:49 :27
353
+ --> $DIR/const-arg-in-const-arg.rs:50 :27
346
354
|
347
355
LL | let _ = Foo::<{ faz::<'b>(&()) }>;
348
356
| ^^
@@ -353,7 +361,7 @@ note: the late bound lifetime parameter is introduced here
353
361
LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
354
362
| ^^
355
363
356
- error: aborting due to 36 previous errors
364
+ error: aborting due to 37 previous errors
357
365
358
366
Some errors have detailed explanations: E0747, E0794.
359
367
For more information about an error, try `rustc --explain E0747`.
0 commit comments