1 error: generic parameters may not be used in const operations
2 --> $DIR/const-arg-in-const-arg.rs:13:23
4 LL | let _: [u8; foo::<T>()];
5 | ^ cannot perform const operation using `T`
7 = note: type parameters may not be used in const expressions
8 = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
10 error: generic parameters may not be used in const operations
11 --> $DIR/const-arg-in-const-arg.rs:14:23
13 LL | let _: [u8; bar::<N>()];
14 | ^ cannot perform const operation using `N`
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
19 error[E0658]: a non-static lifetime is not allowed in a `const`
20 --> $DIR/const-arg-in-const-arg.rs:16:23
22 LL | let _: [u8; faz::<'a>(&())];
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
28 error[E0658]: a non-static lifetime is not allowed in a `const`
29 --> $DIR/const-arg-in-const-arg.rs:18:23
31 LL | let _: [u8; baz::<'a>(&())];
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
37 error[E0658]: a non-static lifetime is not allowed in a `const`
38 --> $DIR/const-arg-in-const-arg.rs:19:23
40 LL | let _: [u8; faz::<'b>(&())];
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
46 error[E0658]: a non-static lifetime is not allowed in a `const`
47 --> $DIR/const-arg-in-const-arg.rs:21:23
49 LL | let _: [u8; baz::<'b>(&())];
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
55 error: generic parameters may not be used in const operations
56 --> $DIR/const-arg-in-const-arg.rs:24:23
58 LL | let _ = [0; bar::<N>()];
59 | ^ cannot perform const operation using `N`
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
64 error[E0658]: a non-static lifetime is not allowed in a `const`
65 --> $DIR/const-arg-in-const-arg.rs:26:23
67 LL | let _ = [0; faz::<'a>(&())];
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
73 error[E0658]: a non-static lifetime is not allowed in a `const`
74 --> $DIR/const-arg-in-const-arg.rs:28:23
76 LL | let _ = [0; baz::<'a>(&())];
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
82 error[E0658]: a non-static lifetime is not allowed in a `const`
83 --> $DIR/const-arg-in-const-arg.rs:29:23
85 LL | let _ = [0; faz::<'b>(&())];
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
91 error[E0658]: a non-static lifetime is not allowed in a `const`
92 --> $DIR/const-arg-in-const-arg.rs:31:23
94 LL | let _ = [0; baz::<'b>(&())];
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
100 error: generic parameters may not be used in const operations
101 --> $DIR/const-arg-in-const-arg.rs:32:24
103 LL | let _: Foo<{ foo::<T>() }>;
104 | ^ cannot perform const operation using `T`
106 = note: type parameters may not be used in const expressions
107 = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
109 error: generic parameters may not be used in const operations
110 --> $DIR/const-arg-in-const-arg.rs:33:24
112 LL | let _: Foo<{ bar::<N>() }>;
113 | ^ cannot perform const operation using `N`
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
118 error[E0658]: a non-static lifetime is not allowed in a `const`
119 --> $DIR/const-arg-in-const-arg.rs:35:24
121 LL | let _: Foo<{ faz::<'a>(&()) }>;
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
127 error[E0658]: a non-static lifetime is not allowed in a `const`
128 --> $DIR/const-arg-in-const-arg.rs:37:24
130 LL | let _: Foo<{ baz::<'a>(&()) }>;
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
136 error[E0658]: a non-static lifetime is not allowed in a `const`
137 --> $DIR/const-arg-in-const-arg.rs:38:24
139 LL | let _: Foo<{ faz::<'b>(&()) }>;
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
145 error[E0658]: a non-static lifetime is not allowed in a `const`
146 --> $DIR/const-arg-in-const-arg.rs:40:24
148 LL | let _: Foo<{ baz::<'b>(&()) }>;
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
154 error: generic parameters may not be used in const operations
155 --> $DIR/const-arg-in-const-arg.rs:41:27
157 LL | let _ = Foo::<{ foo::<T>() }>;
158 | ^ cannot perform const operation using `T`
160 = note: type parameters may not be used in const expressions
161 = help: use `#![feature(generic_const_exprs)]` to allow generic const expressions
163 error: generic parameters may not be used in const operations
164 --> $DIR/const-arg-in-const-arg.rs:42:27
166 LL | let _ = Foo::<{ bar::<N>() }>;
167 | ^ cannot perform const operation using `N`
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
172 error[E0658]: a non-static lifetime is not allowed in a `const`
173 --> $DIR/const-arg-in-const-arg.rs:44:27
175 LL | let _ = Foo::<{ faz::<'a>(&()) }>;
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
181 error[E0658]: a non-static lifetime is not allowed in a `const`
182 --> $DIR/const-arg-in-const-arg.rs:46:27
184 LL | let _ = Foo::<{ baz::<'a>(&()) }>;
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
190 error[E0658]: a non-static lifetime is not allowed in a `const`
191 --> $DIR/const-arg-in-const-arg.rs:47:27
193 LL | let _ = Foo::<{ faz::<'b>(&()) }>;
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
199 error[E0658]: a non-static lifetime is not allowed in a `const`
200 --> $DIR/const-arg-in-const-arg.rs:49:27
202 LL | let _ = Foo::<{ baz::<'b>(&()) }>;
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
208 error[E0747]: unresolved item provided when a constant was expected
209 --> $DIR/const-arg-in-const-arg.rs:14:23
211 LL | let _: [u8; bar::<N>()];
214 help: if this generic argument was intended as a const parameter, surround it with braces
216 LL | let _: [u8; bar::<{ N }>()];
219 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
220 --> $DIR/const-arg-in-const-arg.rs:16:23
222 LL | let _: [u8; faz::<'a>(&())];
225 note: the late bound lifetime parameter is introduced here
226 --> $DIR/const-arg-in-const-arg.rs:8:14
228 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
231 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
232 --> $DIR/const-arg-in-const-arg.rs:19:23
234 LL | let _: [u8; faz::<'b>(&())];
237 note: the late bound lifetime parameter is introduced here
238 --> $DIR/const-arg-in-const-arg.rs:8:14
240 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
243 error[E0747]: unresolved item provided when a constant was expected
244 --> $DIR/const-arg-in-const-arg.rs:24:23
246 LL | let _ = [0; bar::<N>()];
249 help: if this generic argument was intended as a const parameter, surround it with braces
251 LL | let _ = [0; bar::<{ N }>()];
254 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
255 --> $DIR/const-arg-in-const-arg.rs:26:23
257 LL | let _ = [0; faz::<'a>(&())];
260 note: the late bound lifetime parameter is introduced here
261 --> $DIR/const-arg-in-const-arg.rs:8:14
263 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
266 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
267 --> $DIR/const-arg-in-const-arg.rs:29:23
269 LL | let _ = [0; faz::<'b>(&())];
272 note: the late bound lifetime parameter is introduced here
273 --> $DIR/const-arg-in-const-arg.rs:8:14
275 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
278 error[E0747]: unresolved item provided when a constant was expected
279 --> $DIR/const-arg-in-const-arg.rs:33:24
281 LL | let _: Foo<{ bar::<N>() }>;
284 help: if this generic argument was intended as a const parameter, surround it with braces
286 LL | let _: Foo<{ bar::<{ N }>() }>;
289 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
290 --> $DIR/const-arg-in-const-arg.rs:35:24
292 LL | let _: Foo<{ faz::<'a>(&()) }>;
295 note: the late bound lifetime parameter is introduced here
296 --> $DIR/const-arg-in-const-arg.rs:8:14
298 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
301 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
302 --> $DIR/const-arg-in-const-arg.rs:38:24
304 LL | let _: Foo<{ faz::<'b>(&()) }>;
307 note: the late bound lifetime parameter is introduced here
308 --> $DIR/const-arg-in-const-arg.rs:8:14
310 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
313 error: constant expression depends on a generic parameter
314 --> $DIR/const-arg-in-const-arg.rs:23:17
316 LL | let _ = [0; foo::<T>()];
319 = note: this may fail depending on what value the parameter takes
321 error[E0747]: unresolved item provided when a constant was expected
322 --> $DIR/const-arg-in-const-arg.rs:42:27
324 LL | let _ = Foo::<{ bar::<N>() }>;
327 help: if this generic argument was intended as a const parameter, surround it with braces
329 LL | let _ = Foo::<{ bar::<{ N }>() }>;
332 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
333 --> $DIR/const-arg-in-const-arg.rs:44:27
335 LL | let _ = Foo::<{ faz::<'a>(&()) }>;
338 note: the late bound lifetime parameter is introduced here
339 --> $DIR/const-arg-in-const-arg.rs:8:14
341 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
344 error: cannot specify lifetime arguments explicitly if late bound lifetime parameters are present
345 --> $DIR/const-arg-in-const-arg.rs:47:27
347 LL | let _ = Foo::<{ faz::<'b>(&()) }>;
350 note: the late bound lifetime parameter is introduced here
351 --> $DIR/const-arg-in-const-arg.rs:8:14
353 LL | const fn faz<'a>(_: &'a ()) -> usize { 13 }
356 error: aborting due to 36 previous errors
358 Some errors have detailed explanations: E0658, E0747.
359 For more information about an error, try `rustc --explain E0658`.