]> git.lizzy.rs Git - rust.git/blob - tests/ui/const-generics/const-arg-in-const-arg.min.stderr
Rollup merge of #107114 - Erk-:add-absolute-note-to-path-join, r=m-ou-se
[rust.git] / tests / ui / const-generics / const-arg-in-const-arg.min.stderr
1 error: generic parameters may not be used in const operations
2   --> $DIR/const-arg-in-const-arg.rs:13:23
3    |
4 LL |     let _: [u8; foo::<T>()];
5    |                       ^ cannot perform const operation using `T`
6    |
7    = note: type parameters may not be used in const expressions
8    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
9
10 error: generic parameters may not be used in const operations
11   --> $DIR/const-arg-in-const-arg.rs:15:23
12    |
13 LL |     let _: [u8; bar::<N>()];
14    |                       ^ cannot perform const operation using `N`
15    |
16    = help: const parameters may only be used as standalone arguments, i.e. `N`
17    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
18
19 error[E0658]: a non-static lifetime is not allowed in a `const`
20   --> $DIR/const-arg-in-const-arg.rs:18:23
21    |
22 LL |     let _: [u8; faz::<'a>(&())];
23    |                       ^^
24    |
25    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
26    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
27
28 error[E0658]: a non-static lifetime is not allowed in a `const`
29   --> $DIR/const-arg-in-const-arg.rs:20:23
30    |
31 LL |     let _: [u8; baz::<'a>(&())];
32    |                       ^^
33    |
34    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
35    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
36
37 error[E0658]: a non-static lifetime is not allowed in a `const`
38   --> $DIR/const-arg-in-const-arg.rs:21:23
39    |
40 LL |     let _: [u8; faz::<'b>(&())];
41    |                       ^^
42    |
43    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
44    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
45
46 error[E0658]: a non-static lifetime is not allowed in a `const`
47   --> $DIR/const-arg-in-const-arg.rs:23:23
48    |
49 LL |     let _: [u8; baz::<'b>(&())];
50    |                       ^^
51    |
52    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
53    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
54
55 error: generic parameters may not be used in const operations
56   --> $DIR/const-arg-in-const-arg.rs:27:23
57    |
58 LL |     let _ = [0; bar::<N>()];
59    |                       ^ cannot perform const operation using `N`
60    |
61    = help: const parameters may only be used as standalone arguments, i.e. `N`
62    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
63
64 error[E0658]: a non-static lifetime is not allowed in a `const`
65   --> $DIR/const-arg-in-const-arg.rs:30:23
66    |
67 LL |     let _ = [0; faz::<'a>(&())];
68    |                       ^^
69    |
70    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
71    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
72
73 error[E0658]: a non-static lifetime is not allowed in a `const`
74   --> $DIR/const-arg-in-const-arg.rs:32:23
75    |
76 LL |     let _ = [0; baz::<'a>(&())];
77    |                       ^^
78    |
79    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
80    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
81
82 error[E0658]: a non-static lifetime is not allowed in a `const`
83   --> $DIR/const-arg-in-const-arg.rs:33:23
84    |
85 LL |     let _ = [0; faz::<'b>(&())];
86    |                       ^^
87    |
88    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
89    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
90
91 error[E0658]: a non-static lifetime is not allowed in a `const`
92   --> $DIR/const-arg-in-const-arg.rs:35:23
93    |
94 LL |     let _ = [0; baz::<'b>(&())];
95    |                       ^^
96    |
97    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
98    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
99
100 error: generic parameters may not be used in const operations
101   --> $DIR/const-arg-in-const-arg.rs:36:24
102    |
103 LL |     let _: Foo<{ foo::<T>() }>;
104    |                        ^ cannot perform const operation using `T`
105    |
106    = note: type parameters may not be used in const expressions
107    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
108
109 error: generic parameters may not be used in const operations
110   --> $DIR/const-arg-in-const-arg.rs:38:24
111    |
112 LL |     let _: Foo<{ bar::<N>() }>;
113    |                        ^ cannot perform const operation using `N`
114    |
115    = help: const parameters may only be used as standalone arguments, i.e. `N`
116    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
117
118 error[E0658]: a non-static lifetime is not allowed in a `const`
119   --> $DIR/const-arg-in-const-arg.rs:41:24
120    |
121 LL |     let _: Foo<{ faz::<'a>(&()) }>;
122    |                        ^^
123    |
124    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
125    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
126
127 error[E0658]: a non-static lifetime is not allowed in a `const`
128   --> $DIR/const-arg-in-const-arg.rs:43:24
129    |
130 LL |     let _: Foo<{ baz::<'a>(&()) }>;
131    |                        ^^
132    |
133    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
134    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
135
136 error[E0658]: a non-static lifetime is not allowed in a `const`
137   --> $DIR/const-arg-in-const-arg.rs:44:24
138    |
139 LL |     let _: Foo<{ faz::<'b>(&()) }>;
140    |                        ^^
141    |
142    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
143    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
144
145 error[E0658]: a non-static lifetime is not allowed in a `const`
146   --> $DIR/const-arg-in-const-arg.rs:46:24
147    |
148 LL |     let _: Foo<{ baz::<'b>(&()) }>;
149    |                        ^^
150    |
151    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
152    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
153
154 error: generic parameters may not be used in const operations
155   --> $DIR/const-arg-in-const-arg.rs:47:27
156    |
157 LL |     let _ = Foo::<{ foo::<T>() }>;
158    |                           ^ cannot perform const operation using `T`
159    |
160    = note: type parameters may not be used in const expressions
161    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
162
163 error: generic parameters may not be used in const operations
164   --> $DIR/const-arg-in-const-arg.rs:49:27
165    |
166 LL |     let _ = Foo::<{ bar::<N>() }>;
167    |                           ^ cannot perform const operation using `N`
168    |
169    = help: const parameters may only be used as standalone arguments, i.e. `N`
170    = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
171
172 error[E0658]: a non-static lifetime is not allowed in a `const`
173   --> $DIR/const-arg-in-const-arg.rs:52:27
174    |
175 LL |     let _ = Foo::<{ faz::<'a>(&()) }>;
176    |                           ^^
177    |
178    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
179    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
180
181 error[E0658]: a non-static lifetime is not allowed in a `const`
182   --> $DIR/const-arg-in-const-arg.rs:54:27
183    |
184 LL |     let _ = Foo::<{ baz::<'a>(&()) }>;
185    |                           ^^
186    |
187    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
188    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
189
190 error[E0658]: a non-static lifetime is not allowed in a `const`
191   --> $DIR/const-arg-in-const-arg.rs:55:27
192    |
193 LL |     let _ = Foo::<{ faz::<'b>(&()) }>;
194    |                           ^^
195    |
196    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
197    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
198
199 error[E0658]: a non-static lifetime is not allowed in a `const`
200   --> $DIR/const-arg-in-const-arg.rs:57:27
201    |
202 LL |     let _ = Foo::<{ baz::<'b>(&()) }>;
203    |                           ^^
204    |
205    = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information
206    = help: add `#![feature(generic_const_exprs)]` to the crate attributes to enable
207
208 error[E0747]: unresolved item provided when a constant was expected
209   --> $DIR/const-arg-in-const-arg.rs:15:23
210    |
211 LL |     let _: [u8; bar::<N>()];
212    |                       ^
213    |
214 help: if this generic argument was intended as a const parameter, surround it with braces
215    |
216 LL |     let _: [u8; bar::<{ N }>()];
217    |                       +   +
218
219 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
220   --> $DIR/const-arg-in-const-arg.rs:18:23
221    |
222 LL |     let _: [u8; faz::<'a>(&())];
223    |                       ^^
224    |
225 note: the late bound lifetime parameter is introduced here
226   --> $DIR/const-arg-in-const-arg.rs:8:14
227    |
228 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
229    |              ^^
230
231 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
232   --> $DIR/const-arg-in-const-arg.rs:21:23
233    |
234 LL |     let _: [u8; faz::<'b>(&())];
235    |                       ^^
236    |
237 note: the late bound lifetime parameter is introduced here
238   --> $DIR/const-arg-in-const-arg.rs:8:14
239    |
240 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
241    |              ^^
242
243 error[E0747]: unresolved item provided when a constant was expected
244   --> $DIR/const-arg-in-const-arg.rs:38:24
245    |
246 LL |     let _: Foo<{ bar::<N>() }>;
247    |                        ^
248    |
249 help: if this generic argument was intended as a const parameter, surround it with braces
250    |
251 LL |     let _: Foo<{ bar::<{ N }>() }>;
252    |                        +   +
253
254 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
255   --> $DIR/const-arg-in-const-arg.rs:41:24
256    |
257 LL |     let _: Foo<{ faz::<'a>(&()) }>;
258    |                        ^^
259    |
260 note: the late bound lifetime parameter is introduced here
261   --> $DIR/const-arg-in-const-arg.rs:8:14
262    |
263 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
264    |              ^^
265
266 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
267   --> $DIR/const-arg-in-const-arg.rs:44:24
268    |
269 LL |     let _: Foo<{ faz::<'b>(&()) }>;
270    |                        ^^
271    |
272 note: the late bound lifetime parameter is introduced here
273   --> $DIR/const-arg-in-const-arg.rs:8:14
274    |
275 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
276    |              ^^
277
278 error: constant expression depends on a generic parameter
279   --> $DIR/const-arg-in-const-arg.rs:25:17
280    |
281 LL |     let _ = [0; foo::<T>()];
282    |                 ^^^^^^^^^^
283    |
284    = note: this may fail depending on what value the parameter takes
285
286 error[E0747]: unresolved item provided when a constant was expected
287   --> $DIR/const-arg-in-const-arg.rs:27:23
288    |
289 LL |     let _ = [0; bar::<N>()];
290    |                       ^
291    |
292 help: if this generic argument was intended as a const parameter, surround it with braces
293    |
294 LL |     let _ = [0; bar::<{ N }>()];
295    |                       +   +
296
297 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
298   --> $DIR/const-arg-in-const-arg.rs:30:23
299    |
300 LL |     let _ = [0; faz::<'a>(&())];
301    |                       ^^
302    |
303 note: the late bound lifetime parameter is introduced here
304   --> $DIR/const-arg-in-const-arg.rs:8:14
305    |
306 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
307    |              ^^
308
309 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
310   --> $DIR/const-arg-in-const-arg.rs:33:23
311    |
312 LL |     let _ = [0; faz::<'b>(&())];
313    |                       ^^
314    |
315 note: the late bound lifetime parameter is introduced here
316   --> $DIR/const-arg-in-const-arg.rs:8:14
317    |
318 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
319    |              ^^
320
321 error[E0747]: unresolved item provided when a constant was expected
322   --> $DIR/const-arg-in-const-arg.rs:49:27
323    |
324 LL |     let _ = Foo::<{ bar::<N>() }>;
325    |                           ^
326    |
327 help: if this generic argument was intended as a const parameter, surround it with braces
328    |
329 LL |     let _ = Foo::<{ bar::<{ N }>() }>;
330    |                           +   +
331
332 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
333   --> $DIR/const-arg-in-const-arg.rs:52:27
334    |
335 LL |     let _ = Foo::<{ faz::<'a>(&()) }>;
336    |                           ^^
337    |
338 note: the late bound lifetime parameter is introduced here
339   --> $DIR/const-arg-in-const-arg.rs:8:14
340    |
341 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
342    |              ^^
343
344 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
345   --> $DIR/const-arg-in-const-arg.rs:55:27
346    |
347 LL |     let _ = Foo::<{ faz::<'b>(&()) }>;
348    |                           ^^
349    |
350 note: the late bound lifetime parameter is introduced here
351   --> $DIR/const-arg-in-const-arg.rs:8:14
352    |
353 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
354    |              ^^
355
356 error: aborting due to 36 previous errors
357
358 Some errors have detailed explanations: E0658, E0747.
359 For more information about an error, try `rustc --explain E0658`.