@@ -53,7 +53,7 @@ LL | let _: [u8; baz::<'b>(&())];
5353 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
5454
5555error: 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
5757 |
5858LL | let _ = [0; bar::<N>()];
5959 | ^ cannot perform const operation using `N`
@@ -62,7 +62,7 @@ LL | let _ = [0; bar::<N>()];
6262 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
6363
6464error: 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
6666 |
6767LL | let _ = [0; faz::<'a>(&())];
6868 | ^^ cannot perform const operation using `'a`
@@ -71,7 +71,7 @@ LL | let _ = [0; faz::<'a>(&())];
7171 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
7272
7373error: 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
7575 |
7676LL | let _ = [0; baz::<'a>(&())];
7777 | ^^ cannot perform const operation using `'a`
@@ -80,7 +80,7 @@ LL | let _ = [0; baz::<'a>(&())];
8080 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
8181
8282error: 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
8484 |
8585LL | let _ = [0; faz::<'b>(&())];
8686 | ^^ cannot perform const operation using `'b`
@@ -89,7 +89,7 @@ LL | let _ = [0; faz::<'b>(&())];
8989 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
9090
9191error: 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
9393 |
9494LL | let _ = [0; baz::<'b>(&())];
9595 | ^^ cannot perform const operation using `'b`
@@ -98,7 +98,7 @@ LL | let _ = [0; baz::<'b>(&())];
9898 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
9999
100100error: 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
102102 |
103103LL | let _: Foo<{ foo::<T>() }>;
104104 | ^ cannot perform const operation using `T`
@@ -107,7 +107,7 @@ LL | let _: Foo<{ foo::<T>() }>;
107107 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
108108
109109error: 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
111111 |
112112LL | let _: Foo<{ bar::<N>() }>;
113113 | ^ cannot perform const operation using `N`
@@ -116,7 +116,7 @@ LL | let _: Foo<{ bar::<N>() }>;
116116 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
117117
118118error: 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
120120 |
121121LL | let _: Foo<{ faz::<'a>(&()) }>;
122122 | ^^ cannot perform const operation using `'a`
@@ -125,7 +125,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>;
125125 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
126126
127127error: 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
129129 |
130130LL | let _: Foo<{ baz::<'a>(&()) }>;
131131 | ^^ cannot perform const operation using `'a`
@@ -134,7 +134,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>;
134134 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
135135
136136error: 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
138138 |
139139LL | let _: Foo<{ faz::<'b>(&()) }>;
140140 | ^^ cannot perform const operation using `'b`
@@ -143,7 +143,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>;
143143 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
144144
145145error: 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
147147 |
148148LL | let _: Foo<{ baz::<'b>(&()) }>;
149149 | ^^ cannot perform const operation using `'b`
@@ -152,7 +152,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>;
152152 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
153153
154154error: 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
156156 |
157157LL | let _ = Foo::<{ foo::<T>() }>;
158158 | ^ cannot perform const operation using `T`
@@ -161,7 +161,7 @@ LL | let _ = Foo::<{ foo::<T>() }>;
161161 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
162162
163163error: 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
165165 |
166166LL | let _ = Foo::<{ bar::<N>() }>;
167167 | ^ cannot perform const operation using `N`
@@ -170,7 +170,7 @@ LL | let _ = Foo::<{ bar::<N>() }>;
170170 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
171171
172172error: 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
174174 |
175175LL | let _ = Foo::<{ faz::<'a>(&()) }>;
176176 | ^^ cannot perform const operation using `'a`
@@ -179,7 +179,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>;
179179 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
180180
181181error: 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
183183 |
184184LL | let _ = Foo::<{ baz::<'a>(&()) }>;
185185 | ^^ cannot perform const operation using `'a`
@@ -188,7 +188,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>;
188188 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
189189
190190error: 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
192192 |
193193LL | let _ = Foo::<{ faz::<'b>(&()) }>;
194194 | ^^ cannot perform const operation using `'b`
@@ -197,7 +197,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>;
197197 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
198198
199199error: 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
201201 |
202202LL | let _ = Foo::<{ baz::<'b>(&()) }>;
203203 | ^^ cannot perform const operation using `'b`
@@ -241,7 +241,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
241241 | ^^
242242
243243error[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
245245 |
246246LL | let _: Foo<{ bar::<N>() }>;
247247 | ^
@@ -252,7 +252,7 @@ LL | let _: Foo<{ bar::<{ N }>() }>;
252252 | + +
253253
254254error[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
256256 |
257257LL | let _: Foo<{ faz::<'a>(&()) }>;
258258 | ^^
@@ -264,7 +264,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
264264 | ^^
265265
266266error[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
268268 |
269269LL | let _: Foo<{ faz::<'b>(&()) }>;
270270 | ^^
@@ -283,8 +283,16 @@ LL | let _ = [0; foo::<T>()];
283283 |
284284 = note: this may fail depending on what value the parameter takes
285285
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+
286294error[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
288296 |
289297LL | let _ = [0; bar::<N>()];
290298 | ^
@@ -295,7 +303,7 @@ LL | let _ = [0; bar::<{ N }>()];
295303 | + +
296304
297305error[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
299307 |
300308LL | let _ = [0; faz::<'a>(&())];
301309 | ^^
@@ -307,7 +315,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
307315 | ^^
308316
309317error[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
311319 |
312320LL | let _ = [0; faz::<'b>(&())];
313321 | ^^
@@ -319,7 +327,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
319327 | ^^
320328
321329error[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
323331 |
324332LL | let _ = Foo::<{ bar::<N>() }>;
325333 | ^
@@ -330,7 +338,7 @@ LL | let _ = Foo::<{ bar::<{ N }>() }>;
330338 | + +
331339
332340error[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
334342 |
335343LL | let _ = Foo::<{ faz::<'a>(&()) }>;
336344 | ^^
@@ -342,7 +350,7 @@ LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
342350 | ^^
343351
344352error[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
346354 |
347355LL | let _ = Foo::<{ faz::<'b>(&()) }>;
348356 | ^^
@@ -353,7 +361,7 @@ note: the late bound lifetime parameter is introduced here
353361LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
354362 | ^^
355363
356- error: aborting due to 36 previous errors
364+ error: aborting due to 37 previous errors
357365
358366Some errors have detailed explanations: E0747, E0794.
359367For more information about an error, try `rustc --explain E0747`.
0 commit comments