@@ -6,6 +6,7 @@ LL | let _: [u8; foo::<T>()];
66 |
77 = note: type parameters may not be used in const expressions
88 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
9+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
910
1011error: generic parameters may not be used in const operations
1112 --> $DIR/const-arg-in-const-arg.rs:16:23
@@ -15,6 +16,7 @@ LL | let _: [u8; bar::<N>()];
1516 |
1617 = help: const parameters may only be used as standalone arguments here, i.e. `N`
1718 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
19+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
1820
1921error: generic parameters may not be used in const operations
2022 --> $DIR/const-arg-in-const-arg.rs:18:23
@@ -24,6 +26,7 @@ LL | let _: [u8; faz::<'a>(&())];
2426 |
2527 = note: lifetime parameters may not be used in const expressions
2628 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
29+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
2730
2831error: generic parameters may not be used in const operations
2932 --> $DIR/const-arg-in-const-arg.rs:20:23
@@ -33,6 +36,7 @@ LL | let _: [u8; baz::<'a>(&())];
3336 |
3437 = note: lifetime parameters may not be used in const expressions
3538 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
39+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
3640
3741error: generic parameters may not be used in const operations
3842 --> $DIR/const-arg-in-const-arg.rs:21:23
@@ -42,6 +46,7 @@ LL | let _: [u8; faz::<'b>(&())];
4246 |
4347 = note: lifetime parameters may not be used in const expressions
4448 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
49+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
4550
4651error: generic parameters may not be used in const operations
4752 --> $DIR/const-arg-in-const-arg.rs:23:23
@@ -51,6 +56,7 @@ LL | let _: [u8; baz::<'b>(&())];
5156 |
5257 = note: lifetime parameters may not be used in const expressions
5358 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
59+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
5460
5561error: generic parameters may not be used in const operations
5662 --> $DIR/const-arg-in-const-arg.rs:27:23
@@ -60,6 +66,7 @@ LL | let _ = [0; bar::<N>()];
6066 |
6167 = help: const parameters may only be used as standalone arguments here, i.e. `N`
6268 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
69+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
6370
6471error: generic parameters may not be used in const operations
6572 --> $DIR/const-arg-in-const-arg.rs:29:23
@@ -69,6 +76,7 @@ LL | let _ = [0; faz::<'a>(&())];
6976 |
7077 = note: lifetime parameters may not be used in const expressions
7178 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
79+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
7280
7381error: generic parameters may not be used in const operations
7482 --> $DIR/const-arg-in-const-arg.rs:31:23
@@ -78,6 +86,7 @@ LL | let _ = [0; baz::<'a>(&())];
7886 |
7987 = note: lifetime parameters may not be used in const expressions
8088 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
89+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
8190
8291error: generic parameters may not be used in const operations
8392 --> $DIR/const-arg-in-const-arg.rs:32:23
@@ -87,6 +96,7 @@ LL | let _ = [0; faz::<'b>(&())];
8796 |
8897 = note: lifetime parameters may not be used in const expressions
8998 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
99+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
90100
91101error: generic parameters may not be used in const operations
92102 --> $DIR/const-arg-in-const-arg.rs:34:23
@@ -96,6 +106,7 @@ LL | let _ = [0; baz::<'b>(&())];
96106 |
97107 = note: lifetime parameters may not be used in const expressions
98108 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
109+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
99110
100111error: generic parameters may not be used in const operations
101112 --> $DIR/const-arg-in-const-arg.rs:35:24
@@ -105,6 +116,7 @@ LL | let _: Foo<{ foo::<T>() }>;
105116 |
106117 = note: type parameters may not be used in const expressions
107118 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
119+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
108120
109121error: generic parameters may not be used in const operations
110122 --> $DIR/const-arg-in-const-arg.rs:36:24
@@ -114,6 +126,7 @@ LL | let _: Foo<{ bar::<N>() }>;
114126 |
115127 = help: const parameters may only be used as standalone arguments here, i.e. `N`
116128 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
129+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
117130
118131error: generic parameters may not be used in const operations
119132 --> $DIR/const-arg-in-const-arg.rs:38:24
@@ -123,6 +136,7 @@ LL | let _: Foo<{ faz::<'a>(&()) }>;
123136 |
124137 = note: lifetime parameters may not be used in const expressions
125138 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
139+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
126140
127141error: generic parameters may not be used in const operations
128142 --> $DIR/const-arg-in-const-arg.rs:40:24
@@ -132,6 +146,7 @@ LL | let _: Foo<{ baz::<'a>(&()) }>;
132146 |
133147 = note: lifetime parameters may not be used in const expressions
134148 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
149+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
135150
136151error: generic parameters may not be used in const operations
137152 --> $DIR/const-arg-in-const-arg.rs:41:24
@@ -141,6 +156,7 @@ LL | let _: Foo<{ faz::<'b>(&()) }>;
141156 |
142157 = note: lifetime parameters may not be used in const expressions
143158 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
159+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
144160
145161error: generic parameters may not be used in const operations
146162 --> $DIR/const-arg-in-const-arg.rs:43:24
@@ -150,6 +166,7 @@ LL | let _: Foo<{ baz::<'b>(&()) }>;
150166 |
151167 = note: lifetime parameters may not be used in const expressions
152168 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
169+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
153170
154171error: generic parameters may not be used in const operations
155172 --> $DIR/const-arg-in-const-arg.rs:44:27
@@ -159,6 +176,7 @@ LL | let _ = Foo::<{ foo::<T>() }>;
159176 |
160177 = note: type parameters may not be used in const expressions
161178 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
179+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
162180
163181error: generic parameters may not be used in const operations
164182 --> $DIR/const-arg-in-const-arg.rs:45:27
@@ -168,6 +186,7 @@ LL | let _ = Foo::<{ bar::<N>() }>;
168186 |
169187 = help: const parameters may only be used as standalone arguments here, i.e. `N`
170188 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
189+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
171190
172191error: generic parameters may not be used in const operations
173192 --> $DIR/const-arg-in-const-arg.rs:47:27
@@ -177,6 +196,7 @@ LL | let _ = Foo::<{ faz::<'a>(&()) }>;
177196 |
178197 = note: lifetime parameters may not be used in const expressions
179198 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
199+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
180200
181201error: generic parameters may not be used in const operations
182202 --> $DIR/const-arg-in-const-arg.rs:49:27
@@ -186,6 +206,7 @@ LL | let _ = Foo::<{ baz::<'a>(&()) }>;
186206 |
187207 = note: lifetime parameters may not be used in const expressions
188208 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
209+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
189210
190211error: generic parameters may not be used in const operations
191212 --> $DIR/const-arg-in-const-arg.rs:50:27
@@ -195,6 +216,7 @@ LL | let _ = Foo::<{ faz::<'b>(&()) }>;
195216 |
196217 = note: lifetime parameters may not be used in const expressions
197218 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
219+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
198220
199221error: generic parameters may not be used in const operations
200222 --> $DIR/const-arg-in-const-arg.rs:52:27
@@ -204,6 +226,7 @@ LL | let _ = Foo::<{ baz::<'b>(&()) }>;
204226 |
205227 = note: lifetime parameters may not be used in const expressions
206228 = help: add `#![feature(generic_const_exprs)]` to allow generic const expressions
229+ = help: alternatively, you can use `#![feature(generic_const_args)]` and extract the expression into a `type const` item
207230
208231error[E0747]: unresolved item provided when a constant was expected
209232 --> $DIR/const-arg-in-const-arg.rs:16:23
0 commit comments