11error: `[const]` is not allowed here
2- --> $DIR/tilde -const-invalid-places.rs:7:24
2+ --> $DIR/conditionally -const-invalid-places.rs:7:24
33 |
44LL | fn non_const_function<T: [const] Trait>() {}
55 | ^^^^^^^^^
66 |
77note: this function is not `const`, so it cannot have `[const]` trait bounds
8- --> $DIR/tilde -const-invalid-places.rs:7:4
8+ --> $DIR/conditionally -const-invalid-places.rs:7:4
99 |
1010LL | fn non_const_function<T: [const] Trait>() {}
1111 | ^^^^^^^^^^^^^^^^^^
1212
1313error: `[const]` is not allowed here
14- --> $DIR/tilde -const-invalid-places.rs:9:16
14+ --> $DIR/conditionally -const-invalid-places.rs:9:16
1515 |
1616LL | struct Struct<T: [const] Trait> { field: T }
1717 | ^^^^^^^^^
1818 |
1919 = note: this item cannot have `[const]` trait bounds
2020
2121error: `[const]` is not allowed here
22- --> $DIR/tilde -const-invalid-places.rs:10:21
22+ --> $DIR/conditionally -const-invalid-places.rs:10:21
2323 |
2424LL | struct TupleStruct<T: [const] Trait>(T);
2525 | ^^^^^^^^^
2626 |
2727 = note: this item cannot have `[const]` trait bounds
2828
2929error: `[const]` is not allowed here
30- --> $DIR/tilde -const-invalid-places.rs:11:20
30+ --> $DIR/conditionally -const-invalid-places.rs:11:20
3131 |
3232LL | struct UnitStruct<T: [const] Trait>;
3333 | ^^^^^^^^^
3434 |
3535 = note: this item cannot have `[const]` trait bounds
3636
3737error: `[const]` is not allowed here
38- --> $DIR/tilde -const-invalid-places.rs:14:12
38+ --> $DIR/conditionally -const-invalid-places.rs:14:12
3939 |
4040LL | enum Enum<T: [const] Trait> { Variant(T) }
4141 | ^^^^^^^^^
4242 |
4343 = note: this item cannot have `[const]` trait bounds
4444
4545error: `[const]` is not allowed here
46- --> $DIR/tilde -const-invalid-places.rs:16:14
46+ --> $DIR/conditionally -const-invalid-places.rs:16:14
4747 |
4848LL | union Union<T: [const] Trait> { field: T }
4949 | ^^^^^^^^^
5050 |
5151 = note: this item cannot have `[const]` trait bounds
5252
5353error: `[const]` is not allowed here
54- --> $DIR/tilde -const-invalid-places.rs:19:12
54+ --> $DIR/conditionally -const-invalid-places.rs:19:12
5555 |
5656LL | type Type<T: [const] Trait> = T;
5757 | ^^^^^^^^^
5858 |
5959 = note: this item cannot have `[const]` trait bounds
6060
6161error: `[const]` is not allowed here
62- --> $DIR/tilde -const-invalid-places.rs:21:17
62+ --> $DIR/conditionally -const-invalid-places.rs:21:17
6363 |
6464LL | const CONSTANT<T: [const] Trait>: () = ();
6565 | ^^^^^^^^^
6666 |
6767 = note: this item cannot have `[const]` trait bounds
6868
6969error: `[const]` is not allowed here
70- --> $DIR/tilde -const-invalid-places.rs:25:16
70+ --> $DIR/conditionally -const-invalid-places.rs:25:16
7171 |
7272LL | type Type<T: [const] Trait>: [const] Trait;
7373 | ^^^^^^^^^
7474 |
7575note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
76- --> $DIR/tilde -const-invalid-places.rs:25:5
76+ --> $DIR/conditionally -const-invalid-places.rs:25:5
7777 |
7878LL | type Type<T: [const] Trait>: [const] Trait;
7979 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080
8181error: `[const]` is not allowed here
82- --> $DIR/tilde -const-invalid-places.rs:25:32
82+ --> $DIR/conditionally -const-invalid-places.rs:25:32
8383 |
8484LL | type Type<T: [const] Trait>: [const] Trait;
8585 | ^^^^^^^^^
8686 |
8787note: associated types in non-`#[const_trait]` traits cannot have `[const]` trait bounds
88- --> $DIR/tilde -const-invalid-places.rs:25:5
88+ --> $DIR/conditionally -const-invalid-places.rs:25:5
8989 |
9090LL | type Type<T: [const] Trait>: [const] Trait;
9191 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9292
9393error: `[const]` is not allowed here
94- --> $DIR/tilde -const-invalid-places.rs:28:28
94+ --> $DIR/conditionally -const-invalid-places.rs:28:28
9595 |
9696LL | fn non_const_function<T: [const] Trait>();
9797 | ^^^^^^^^^
9898 |
9999note: this function is not `const`, so it cannot have `[const]` trait bounds
100- --> $DIR/tilde -const-invalid-places.rs:28:8
100+ --> $DIR/conditionally -const-invalid-places.rs:28:8
101101 |
102102LL | fn non_const_function<T: [const] Trait>();
103103 | ^^^^^^^^^^^^^^^^^^
104104
105105error: `[const]` is not allowed here
106- --> $DIR/tilde -const-invalid-places.rs:29:21
106+ --> $DIR/conditionally -const-invalid-places.rs:29:21
107107 |
108108LL | const CONSTANT<T: [const] Trait>: ();
109109 | ^^^^^^^^^
110110 |
111111 = note: this item cannot have `[const]` trait bounds
112112
113113error: `[const]` is not allowed here
114- --> $DIR/tilde -const-invalid-places.rs:34:16
114+ --> $DIR/conditionally -const-invalid-places.rs:34:16
115115 |
116116LL | type Type<T: [const] Trait> = ();
117117 | ^^^^^^^^^
118118 |
119119note: associated types in non-const impls cannot have `[const]` trait bounds
120- --> $DIR/tilde -const-invalid-places.rs:34:5
120+ --> $DIR/conditionally -const-invalid-places.rs:34:5
121121 |
122122LL | type Type<T: [const] Trait> = ();
123123 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124124
125125error: `[const]` is not allowed here
126- --> $DIR/tilde -const-invalid-places.rs:36:28
126+ --> $DIR/conditionally -const-invalid-places.rs:36:28
127127 |
128128LL | fn non_const_function<T: [const] Trait>() {}
129129 | ^^^^^^^^^
130130 |
131131note: this function is not `const`, so it cannot have `[const]` trait bounds
132- --> $DIR/tilde -const-invalid-places.rs:36:8
132+ --> $DIR/conditionally -const-invalid-places.rs:36:8
133133 |
134134LL | fn non_const_function<T: [const] Trait>() {}
135135 | ^^^^^^^^^^^^^^^^^^
136136
137137error: `[const]` is not allowed here
138- --> $DIR/tilde -const-invalid-places.rs:37:21
138+ --> $DIR/conditionally -const-invalid-places.rs:37:21
139139 |
140140LL | const CONSTANT<T: [const] Trait>: () = ();
141141 | ^^^^^^^^^
142142 |
143143 = note: this item cannot have `[const]` trait bounds
144144
145145error: `[const]` is not allowed here
146- --> $DIR/tilde -const-invalid-places.rs:44:16
146+ --> $DIR/conditionally -const-invalid-places.rs:44:16
147147 |
148148LL | type Type<T: [const] Trait> = ();
149149 | ^^^^^^^^^
150150 |
151151note: inherent associated types cannot have `[const]` trait bounds
152- --> $DIR/tilde -const-invalid-places.rs:44:5
152+ --> $DIR/conditionally -const-invalid-places.rs:44:5
153153 |
154154LL | type Type<T: [const] Trait> = ();
155155 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156156
157157error: `[const]` is not allowed here
158- --> $DIR/tilde -const-invalid-places.rs:46:28
158+ --> $DIR/conditionally -const-invalid-places.rs:46:28
159159 |
160160LL | fn non_const_function<T: [const] Trait>() {}
161161 | ^^^^^^^^^
162162 |
163163note: this function is not `const`, so it cannot have `[const]` trait bounds
164- --> $DIR/tilde -const-invalid-places.rs:46:8
164+ --> $DIR/conditionally -const-invalid-places.rs:46:8
165165 |
166166LL | fn non_const_function<T: [const] Trait>() {}
167167 | ^^^^^^^^^^^^^^^^^^
168168
169169error: `[const]` is not allowed here
170- --> $DIR/tilde -const-invalid-places.rs:47:21
170+ --> $DIR/conditionally -const-invalid-places.rs:47:21
171171 |
172172LL | const CONSTANT<T: [const] Trait>: () = ();
173173 | ^^^^^^^^^
174174 |
175175 = note: this item cannot have `[const]` trait bounds
176176
177177error: `[const]` is not allowed here
178- --> $DIR/tilde -const-invalid-places.rs:52:13
178+ --> $DIR/conditionally -const-invalid-places.rs:52:13
179179 |
180180LL | trait Child0: [const] Trait {}
181181 | ^^^^^^^^^
182182 |
183183note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
184- --> $DIR/tilde -const-invalid-places.rs:52:1
184+ --> $DIR/conditionally -const-invalid-places.rs:52:1
185185 |
186186LL | trait Child0: [const] Trait {}
187187 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188
189189error: `[const]` is not allowed here
190- --> $DIR/tilde -const-invalid-places.rs:53:24
190+ --> $DIR/conditionally -const-invalid-places.rs:53:24
191191 |
192192LL | trait Child1 where Self: [const] Trait {}
193193 | ^^^^^^^^^
194194 |
195195note: this trait is not a `#[const_trait]`, so it cannot have `[const]` trait bounds
196- --> $DIR/tilde -const-invalid-places.rs:53:1
196+ --> $DIR/conditionally -const-invalid-places.rs:53:1
197197 |
198198LL | trait Child1 where Self: [const] Trait {}
199199 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200200
201201error: `[const]` is not allowed here
202- --> $DIR/tilde -const-invalid-places.rs:56:7
202+ --> $DIR/conditionally -const-invalid-places.rs:56:7
203203 |
204204LL | impl<T: [const] Trait> Trait for T {}
205205 | ^^^^^^^^^
206206 |
207207note: this impl is not `const`, so it cannot have `[const]` trait bounds
208- --> $DIR/tilde -const-invalid-places.rs:56:1
208+ --> $DIR/conditionally -const-invalid-places.rs:56:1
209209 |
210210LL | impl<T: [const] Trait> Trait for T {}
211211 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212212
213213error: `[const]` is not allowed here
214- --> $DIR/tilde -const-invalid-places.rs:59:7
214+ --> $DIR/conditionally -const-invalid-places.rs:59:7
215215 |
216216LL | impl<T: [const] Trait> Struct<T> {}
217217 | ^^^^^^^^^
218218 |
219219note: inherent impls cannot have `[const]` trait bounds
220- --> $DIR/tilde -const-invalid-places.rs:59:1
220+ --> $DIR/conditionally -const-invalid-places.rs:59:1
221221 |
222222LL | impl<T: [const] Trait> Struct<T> {}
223223 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224224
225225error[E0658]: generic const items are experimental
226- --> $DIR/tilde -const-invalid-places.rs:21:15
226+ --> $DIR/conditionally -const-invalid-places.rs:21:15
227227 |
228228LL | const CONSTANT<T: [const] Trait>: () = ();
229229 | ^^^^^^^^^^^^^^^^^^
@@ -233,7 +233,7 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
233233 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
234234
235235error[E0658]: generic const items are experimental
236- --> $DIR/tilde -const-invalid-places.rs:29:19
236+ --> $DIR/conditionally -const-invalid-places.rs:29:19
237237 |
238238LL | const CONSTANT<T: [const] Trait>: ();
239239 | ^^^^^^^^^^^^^^^^^^
@@ -243,7 +243,7 @@ LL | const CONSTANT<T: [const] Trait>: ();
243243 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
244244
245245error[E0658]: generic const items are experimental
246- --> $DIR/tilde -const-invalid-places.rs:37:19
246+ --> $DIR/conditionally -const-invalid-places.rs:37:19
247247 |
248248LL | const CONSTANT<T: [const] Trait>: () = ();
249249 | ^^^^^^^^^^^^^^^^^^
@@ -253,7 +253,7 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
253253 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
254254
255255error[E0658]: generic const items are experimental
256- --> $DIR/tilde -const-invalid-places.rs:47:19
256+ --> $DIR/conditionally -const-invalid-places.rs:47:19
257257 |
258258LL | const CONSTANT<T: [const] Trait>: () = ();
259259 | ^^^^^^^^^^^^^^^^^^
@@ -263,15 +263,15 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
263263 = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
264264
265265error[E0392]: type parameter `T` is never used
266- --> $DIR/tilde -const-invalid-places.rs:11:19
266+ --> $DIR/conditionally -const-invalid-places.rs:11:19
267267 |
268268LL | struct UnitStruct<T: [const] Trait>;
269269 | ^ unused type parameter
270270 |
271271 = help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
272272
273273error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
274- --> $DIR/tilde -const-invalid-places.rs:16:33
274+ --> $DIR/conditionally -const-invalid-places.rs:16:33
275275 |
276276LL | union Union<T: [const] Trait> { field: T }
277277 | ^^^^^^^^
@@ -283,19 +283,19 @@ LL | union Union<T: [const] Trait> { field: std::mem::ManuallyDrop<T> }
283283 | +++++++++++++++++++++++ +
284284
285285error[E0275]: overflow evaluating the requirement `(): Trait`
286- --> $DIR/tilde -const-invalid-places.rs:34:35
286+ --> $DIR/conditionally -const-invalid-places.rs:34:35
287287 |
288288LL | type Type<T: [const] Trait> = ();
289289 | ^^
290290 |
291291note: required by a bound in `NonConstTrait::Type`
292- --> $DIR/tilde -const-invalid-places.rs:25:34
292+ --> $DIR/conditionally -const-invalid-places.rs:25:34
293293 |
294294LL | type Type<T: [const] Trait>: [const] Trait;
295295 | ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
296296
297297error[E0658]: inherent associated types are unstable
298- --> $DIR/tilde -const-invalid-places.rs:44:5
298+ --> $DIR/conditionally -const-invalid-places.rs:44:5
299299 |
300300LL | type Type<T: [const] Trait> = ();
301301 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments