1
1
error: `[const]` is not allowed here
2
- --> $DIR/tilde -const-invalid-places.rs:7:24
2
+ --> $DIR/conditionally -const-invalid-places.rs:7:24
3
3
|
4
4
LL | fn non_const_function<T: [const] Trait>() {}
5
5
| ^^^^^^^^^
6
6
|
7
7
note: 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
9
9
|
10
10
LL | fn non_const_function<T: [const] Trait>() {}
11
11
| ^^^^^^^^^^^^^^^^^^
12
12
13
13
error: `[const]` is not allowed here
14
- --> $DIR/tilde -const-invalid-places.rs:9:16
14
+ --> $DIR/conditionally -const-invalid-places.rs:9:16
15
15
|
16
16
LL | struct Struct<T: [const] Trait> { field: T }
17
17
| ^^^^^^^^^
18
18
|
19
19
= note: this item cannot have `[const]` trait bounds
20
20
21
21
error: `[const]` is not allowed here
22
- --> $DIR/tilde -const-invalid-places.rs:10:21
22
+ --> $DIR/conditionally -const-invalid-places.rs:10:21
23
23
|
24
24
LL | struct TupleStruct<T: [const] Trait>(T);
25
25
| ^^^^^^^^^
26
26
|
27
27
= note: this item cannot have `[const]` trait bounds
28
28
29
29
error: `[const]` is not allowed here
30
- --> $DIR/tilde -const-invalid-places.rs:11:20
30
+ --> $DIR/conditionally -const-invalid-places.rs:11:20
31
31
|
32
32
LL | struct UnitStruct<T: [const] Trait>;
33
33
| ^^^^^^^^^
34
34
|
35
35
= note: this item cannot have `[const]` trait bounds
36
36
37
37
error: `[const]` is not allowed here
38
- --> $DIR/tilde -const-invalid-places.rs:14:12
38
+ --> $DIR/conditionally -const-invalid-places.rs:14:12
39
39
|
40
40
LL | enum Enum<T: [const] Trait> { Variant(T) }
41
41
| ^^^^^^^^^
42
42
|
43
43
= note: this item cannot have `[const]` trait bounds
44
44
45
45
error: `[const]` is not allowed here
46
- --> $DIR/tilde -const-invalid-places.rs:16:14
46
+ --> $DIR/conditionally -const-invalid-places.rs:16:14
47
47
|
48
48
LL | union Union<T: [const] Trait> { field: T }
49
49
| ^^^^^^^^^
50
50
|
51
51
= note: this item cannot have `[const]` trait bounds
52
52
53
53
error: `[const]` is not allowed here
54
- --> $DIR/tilde -const-invalid-places.rs:19:12
54
+ --> $DIR/conditionally -const-invalid-places.rs:19:12
55
55
|
56
56
LL | type Type<T: [const] Trait> = T;
57
57
| ^^^^^^^^^
58
58
|
59
59
= note: this item cannot have `[const]` trait bounds
60
60
61
61
error: `[const]` is not allowed here
62
- --> $DIR/tilde -const-invalid-places.rs:21:17
62
+ --> $DIR/conditionally -const-invalid-places.rs:21:17
63
63
|
64
64
LL | const CONSTANT<T: [const] Trait>: () = ();
65
65
| ^^^^^^^^^
66
66
|
67
67
= note: this item cannot have `[const]` trait bounds
68
68
69
69
error: `[const]` is not allowed here
70
- --> $DIR/tilde -const-invalid-places.rs:25:16
70
+ --> $DIR/conditionally -const-invalid-places.rs:25:16
71
71
|
72
72
LL | type Type<T: [const] Trait>: [const] Trait;
73
73
| ^^^^^^^^^
74
74
|
75
75
note: 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
77
77
|
78
78
LL | type Type<T: [const] Trait>: [const] Trait;
79
79
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80
80
81
81
error: `[const]` is not allowed here
82
- --> $DIR/tilde -const-invalid-places.rs:25:32
82
+ --> $DIR/conditionally -const-invalid-places.rs:25:32
83
83
|
84
84
LL | type Type<T: [const] Trait>: [const] Trait;
85
85
| ^^^^^^^^^
86
86
|
87
87
note: 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
89
89
|
90
90
LL | type Type<T: [const] Trait>: [const] Trait;
91
91
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
92
92
93
93
error: `[const]` is not allowed here
94
- --> $DIR/tilde -const-invalid-places.rs:28:28
94
+ --> $DIR/conditionally -const-invalid-places.rs:28:28
95
95
|
96
96
LL | fn non_const_function<T: [const] Trait>();
97
97
| ^^^^^^^^^
98
98
|
99
99
note: 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
101
101
|
102
102
LL | fn non_const_function<T: [const] Trait>();
103
103
| ^^^^^^^^^^^^^^^^^^
104
104
105
105
error: `[const]` is not allowed here
106
- --> $DIR/tilde -const-invalid-places.rs:29:21
106
+ --> $DIR/conditionally -const-invalid-places.rs:29:21
107
107
|
108
108
LL | const CONSTANT<T: [const] Trait>: ();
109
109
| ^^^^^^^^^
110
110
|
111
111
= note: this item cannot have `[const]` trait bounds
112
112
113
113
error: `[const]` is not allowed here
114
- --> $DIR/tilde -const-invalid-places.rs:34:16
114
+ --> $DIR/conditionally -const-invalid-places.rs:34:16
115
115
|
116
116
LL | type Type<T: [const] Trait> = ();
117
117
| ^^^^^^^^^
118
118
|
119
119
note: 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
121
121
|
122
122
LL | type Type<T: [const] Trait> = ();
123
123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124
124
125
125
error: `[const]` is not allowed here
126
- --> $DIR/tilde -const-invalid-places.rs:36:28
126
+ --> $DIR/conditionally -const-invalid-places.rs:36:28
127
127
|
128
128
LL | fn non_const_function<T: [const] Trait>() {}
129
129
| ^^^^^^^^^
130
130
|
131
131
note: 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
133
133
|
134
134
LL | fn non_const_function<T: [const] Trait>() {}
135
135
| ^^^^^^^^^^^^^^^^^^
136
136
137
137
error: `[const]` is not allowed here
138
- --> $DIR/tilde -const-invalid-places.rs:37:21
138
+ --> $DIR/conditionally -const-invalid-places.rs:37:21
139
139
|
140
140
LL | const CONSTANT<T: [const] Trait>: () = ();
141
141
| ^^^^^^^^^
142
142
|
143
143
= note: this item cannot have `[const]` trait bounds
144
144
145
145
error: `[const]` is not allowed here
146
- --> $DIR/tilde -const-invalid-places.rs:44:16
146
+ --> $DIR/conditionally -const-invalid-places.rs:44:16
147
147
|
148
148
LL | type Type<T: [const] Trait> = ();
149
149
| ^^^^^^^^^
150
150
|
151
151
note: 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
153
153
|
154
154
LL | type Type<T: [const] Trait> = ();
155
155
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156
156
157
157
error: `[const]` is not allowed here
158
- --> $DIR/tilde -const-invalid-places.rs:46:28
158
+ --> $DIR/conditionally -const-invalid-places.rs:46:28
159
159
|
160
160
LL | fn non_const_function<T: [const] Trait>() {}
161
161
| ^^^^^^^^^
162
162
|
163
163
note: 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
165
165
|
166
166
LL | fn non_const_function<T: [const] Trait>() {}
167
167
| ^^^^^^^^^^^^^^^^^^
168
168
169
169
error: `[const]` is not allowed here
170
- --> $DIR/tilde -const-invalid-places.rs:47:21
170
+ --> $DIR/conditionally -const-invalid-places.rs:47:21
171
171
|
172
172
LL | const CONSTANT<T: [const] Trait>: () = ();
173
173
| ^^^^^^^^^
174
174
|
175
175
= note: this item cannot have `[const]` trait bounds
176
176
177
177
error: `[const]` is not allowed here
178
- --> $DIR/tilde -const-invalid-places.rs:52:13
178
+ --> $DIR/conditionally -const-invalid-places.rs:52:13
179
179
|
180
180
LL | trait Child0: [const] Trait {}
181
181
| ^^^^^^^^^
182
182
|
183
183
note: 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
185
185
|
186
186
LL | trait Child0: [const] Trait {}
187
187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188
188
189
189
error: `[const]` is not allowed here
190
- --> $DIR/tilde -const-invalid-places.rs:53:24
190
+ --> $DIR/conditionally -const-invalid-places.rs:53:24
191
191
|
192
192
LL | trait Child1 where Self: [const] Trait {}
193
193
| ^^^^^^^^^
194
194
|
195
195
note: 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
197
197
|
198
198
LL | trait Child1 where Self: [const] Trait {}
199
199
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200
200
201
201
error: `[const]` is not allowed here
202
- --> $DIR/tilde -const-invalid-places.rs:56:7
202
+ --> $DIR/conditionally -const-invalid-places.rs:56:7
203
203
|
204
204
LL | impl<T: [const] Trait> Trait for T {}
205
205
| ^^^^^^^^^
206
206
|
207
207
note: 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
209
209
|
210
210
LL | impl<T: [const] Trait> Trait for T {}
211
211
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212
212
213
213
error: `[const]` is not allowed here
214
- --> $DIR/tilde -const-invalid-places.rs:59:7
214
+ --> $DIR/conditionally -const-invalid-places.rs:59:7
215
215
|
216
216
LL | impl<T: [const] Trait> Struct<T> {}
217
217
| ^^^^^^^^^
218
218
|
219
219
note: 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
221
221
|
222
222
LL | impl<T: [const] Trait> Struct<T> {}
223
223
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224
224
225
225
error[E0658]: generic const items are experimental
226
- --> $DIR/tilde -const-invalid-places.rs:21:15
226
+ --> $DIR/conditionally -const-invalid-places.rs:21:15
227
227
|
228
228
LL | const CONSTANT<T: [const] Trait>: () = ();
229
229
| ^^^^^^^^^^^^^^^^^^
@@ -233,7 +233,7 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
233
233
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
234
234
235
235
error[E0658]: generic const items are experimental
236
- --> $DIR/tilde -const-invalid-places.rs:29:19
236
+ --> $DIR/conditionally -const-invalid-places.rs:29:19
237
237
|
238
238
LL | const CONSTANT<T: [const] Trait>: ();
239
239
| ^^^^^^^^^^^^^^^^^^
@@ -243,7 +243,7 @@ LL | const CONSTANT<T: [const] Trait>: ();
243
243
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
244
244
245
245
error[E0658]: generic const items are experimental
246
- --> $DIR/tilde -const-invalid-places.rs:37:19
246
+ --> $DIR/conditionally -const-invalid-places.rs:37:19
247
247
|
248
248
LL | const CONSTANT<T: [const] Trait>: () = ();
249
249
| ^^^^^^^^^^^^^^^^^^
@@ -253,7 +253,7 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
253
253
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
254
254
255
255
error[E0658]: generic const items are experimental
256
- --> $DIR/tilde -const-invalid-places.rs:47:19
256
+ --> $DIR/conditionally -const-invalid-places.rs:47:19
257
257
|
258
258
LL | const CONSTANT<T: [const] Trait>: () = ();
259
259
| ^^^^^^^^^^^^^^^^^^
@@ -263,15 +263,15 @@ LL | const CONSTANT<T: [const] Trait>: () = ();
263
263
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
264
264
265
265
error[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
267
267
|
268
268
LL | struct UnitStruct<T: [const] Trait>;
269
269
| ^ unused type parameter
270
270
|
271
271
= help: consider removing `T`, referring to it in a field, or using a marker such as `PhantomData`
272
272
273
273
error[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
275
275
|
276
276
LL | union Union<T: [const] Trait> { field: T }
277
277
| ^^^^^^^^
@@ -283,19 +283,19 @@ LL | union Union<T: [const] Trait> { field: std::mem::ManuallyDrop<T> }
283
283
| +++++++++++++++++++++++ +
284
284
285
285
error[E0275]: overflow evaluating the requirement `(): Trait`
286
- --> $DIR/tilde -const-invalid-places.rs:34:35
286
+ --> $DIR/conditionally -const-invalid-places.rs:34:35
287
287
|
288
288
LL | type Type<T: [const] Trait> = ();
289
289
| ^^
290
290
|
291
291
note: 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
293
293
|
294
294
LL | type Type<T: [const] Trait>: [const] Trait;
295
295
| ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
296
296
297
297
error[E0658]: inherent associated types are unstable
298
- --> $DIR/tilde -const-invalid-places.rs:44:5
298
+ --> $DIR/conditionally -const-invalid-places.rs:44:5
299
299
|
300
300
LL | type Type<T: [const] Trait> = ();
301
301
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments