Skip to content

Commit a9f1140

Browse files
committed
Rename tilde const test files to conditionally const
1 parent 7e0b032 commit a9f1140

18 files changed

+65
-62
lines changed

src/tools/tidy/src/issues.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3921,7 +3921,6 @@ ui/traits/const-traits/issue-79450.rs
39213921
ui/traits/const-traits/issue-88155.rs
39223922
ui/traits/const-traits/issue-92111.rs
39233923
ui/traits/const-traits/issue-92230-wf-super-trait-env.rs
3924-
ui/traits/const-traits/specialization/issue-95186-specialize-on-tilde-const.rs
39253924
ui/traits/const-traits/specialization/issue-95187-same-trait-bound-different-constness.rs
39263925
ui/traits/issue-103563.rs
39273926
ui/traits/issue-104322.rs

tests/ui/traits/const-traits/call-const-in-tilde-const.stderr renamed to tests/ui/traits/const-traits/call-const-in-conditionally-const.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error[E0277]: the trait bound `T: const Foo` is not satisfied
2-
--> $DIR/call-const-in-tilde-const.rs:9:13
2+
--> $DIR/call-const-in-conditionally-const.rs:9:13
33
|
44
LL | const { T::foo() }
55
| ^

tests/ui/traits/const-traits/tilde-const-and-const-params.stderr renamed to tests/ui/traits/const-traits/conditionally-const-and-const-params.stderr

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
11
error: `[const]` is not allowed here
2-
--> $DIR/tilde-const-and-const-params.rs:8:13
2+
--> $DIR/conditionally-const-and-const-params.rs:8:13
33
|
44
LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
55
| ^^^^^^^^^
66
|
77
note: this function is not `const`, so it cannot have `[const]` trait bounds
8-
--> $DIR/tilde-const-and-const-params.rs:8:8
8+
--> $DIR/conditionally-const-and-const-params.rs:8:8
99
|
1010
LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
1111
| ^^^
1212

1313
error: `[const]` is not allowed here
14-
--> $DIR/tilde-const-and-const-params.rs:26:9
14+
--> $DIR/conditionally-const-and-const-params.rs:26:9
1515
|
1616
LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
1717
| ^^^^^^^^^
1818
|
1919
note: this function is not `const`, so it cannot have `[const]` trait bounds
20-
--> $DIR/tilde-const-and-const-params.rs:26:4
20+
--> $DIR/conditionally-const-and-const-params.rs:26:4
2121
|
2222
LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
2323
| ^^^
2424

2525
error[E0277]: the trait bound `A: const Add42` is not satisfied
26-
--> $DIR/tilde-const-and-const-params.rs:26:62
26+
--> $DIR/conditionally-const-and-const-params.rs:26:62
2727
|
2828
LL | fn bar<A: [const] Add42, const N: usize>(_: Foo<N>) -> Foo<{ A::add(N) }> {
2929
| ^
3030

3131
error[E0277]: the trait bound `A: const Add42` is not satisfied
32-
--> $DIR/tilde-const-and-const-params.rs:8:45
32+
--> $DIR/conditionally-const-and-const-params.rs:8:45
3333
|
3434
LL | fn add<A: [const] Add42>(self) -> Foo<{ A::add(N) }> {
3535
| ^

tests/ui/traits/const-traits/tilde-const-invalid-places.stderr renamed to tests/ui/traits/const-traits/conditionally-const-invalid-places.stderr

Lines changed: 43 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,229 +1,229 @@
11
error: `[const]` is not allowed here
2-
--> $DIR/tilde-const-invalid-places.rs:7:24
2+
--> $DIR/conditionally-const-invalid-places.rs:7:24
33
|
44
LL | fn non_const_function<T: [const] Trait>() {}
55
| ^^^^^^^^^
66
|
77
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
99
|
1010
LL | fn non_const_function<T: [const] Trait>() {}
1111
| ^^^^^^^^^^^^^^^^^^
1212

1313
error: `[const]` is not allowed here
14-
--> $DIR/tilde-const-invalid-places.rs:9:16
14+
--> $DIR/conditionally-const-invalid-places.rs:9:16
1515
|
1616
LL | struct Struct<T: [const] Trait> { field: T }
1717
| ^^^^^^^^^
1818
|
1919
= note: this item cannot have `[const]` trait bounds
2020

2121
error: `[const]` is not allowed here
22-
--> $DIR/tilde-const-invalid-places.rs:10:21
22+
--> $DIR/conditionally-const-invalid-places.rs:10:21
2323
|
2424
LL | struct TupleStruct<T: [const] Trait>(T);
2525
| ^^^^^^^^^
2626
|
2727
= note: this item cannot have `[const]` trait bounds
2828

2929
error: `[const]` is not allowed here
30-
--> $DIR/tilde-const-invalid-places.rs:11:20
30+
--> $DIR/conditionally-const-invalid-places.rs:11:20
3131
|
3232
LL | struct UnitStruct<T: [const] Trait>;
3333
| ^^^^^^^^^
3434
|
3535
= note: this item cannot have `[const]` trait bounds
3636

3737
error: `[const]` is not allowed here
38-
--> $DIR/tilde-const-invalid-places.rs:14:12
38+
--> $DIR/conditionally-const-invalid-places.rs:14:12
3939
|
4040
LL | enum Enum<T: [const] Trait> { Variant(T) }
4141
| ^^^^^^^^^
4242
|
4343
= note: this item cannot have `[const]` trait bounds
4444

4545
error: `[const]` is not allowed here
46-
--> $DIR/tilde-const-invalid-places.rs:16:14
46+
--> $DIR/conditionally-const-invalid-places.rs:16:14
4747
|
4848
LL | union Union<T: [const] Trait> { field: T }
4949
| ^^^^^^^^^
5050
|
5151
= note: this item cannot have `[const]` trait bounds
5252

5353
error: `[const]` is not allowed here
54-
--> $DIR/tilde-const-invalid-places.rs:19:12
54+
--> $DIR/conditionally-const-invalid-places.rs:19:12
5555
|
5656
LL | type Type<T: [const] Trait> = T;
5757
| ^^^^^^^^^
5858
|
5959
= note: this item cannot have `[const]` trait bounds
6060

6161
error: `[const]` is not allowed here
62-
--> $DIR/tilde-const-invalid-places.rs:21:17
62+
--> $DIR/conditionally-const-invalid-places.rs:21:17
6363
|
6464
LL | const CONSTANT<T: [const] Trait>: () = ();
6565
| ^^^^^^^^^
6666
|
6767
= note: this item cannot have `[const]` trait bounds
6868

6969
error: `[const]` is not allowed here
70-
--> $DIR/tilde-const-invalid-places.rs:25:16
70+
--> $DIR/conditionally-const-invalid-places.rs:25:16
7171
|
7272
LL | type Type<T: [const] Trait>: [const] Trait;
7373
| ^^^^^^^^^
7474
|
7575
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
7777
|
7878
LL | type Type<T: [const] Trait>: [const] Trait;
7979
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
8080

8181
error: `[const]` is not allowed here
82-
--> $DIR/tilde-const-invalid-places.rs:25:32
82+
--> $DIR/conditionally-const-invalid-places.rs:25:32
8383
|
8484
LL | type Type<T: [const] Trait>: [const] Trait;
8585
| ^^^^^^^^^
8686
|
8787
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
8989
|
9090
LL | type Type<T: [const] Trait>: [const] Trait;
9191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9292

9393
error: `[const]` is not allowed here
94-
--> $DIR/tilde-const-invalid-places.rs:28:28
94+
--> $DIR/conditionally-const-invalid-places.rs:28:28
9595
|
9696
LL | fn non_const_function<T: [const] Trait>();
9797
| ^^^^^^^^^
9898
|
9999
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
101101
|
102102
LL | fn non_const_function<T: [const] Trait>();
103103
| ^^^^^^^^^^^^^^^^^^
104104

105105
error: `[const]` is not allowed here
106-
--> $DIR/tilde-const-invalid-places.rs:29:21
106+
--> $DIR/conditionally-const-invalid-places.rs:29:21
107107
|
108108
LL | const CONSTANT<T: [const] Trait>: ();
109109
| ^^^^^^^^^
110110
|
111111
= note: this item cannot have `[const]` trait bounds
112112

113113
error: `[const]` is not allowed here
114-
--> $DIR/tilde-const-invalid-places.rs:34:16
114+
--> $DIR/conditionally-const-invalid-places.rs:34:16
115115
|
116116
LL | type Type<T: [const] Trait> = ();
117117
| ^^^^^^^^^
118118
|
119119
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
121121
|
122122
LL | type Type<T: [const] Trait> = ();
123123
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124124

125125
error: `[const]` is not allowed here
126-
--> $DIR/tilde-const-invalid-places.rs:36:28
126+
--> $DIR/conditionally-const-invalid-places.rs:36:28
127127
|
128128
LL | fn non_const_function<T: [const] Trait>() {}
129129
| ^^^^^^^^^
130130
|
131131
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
133133
|
134134
LL | fn non_const_function<T: [const] Trait>() {}
135135
| ^^^^^^^^^^^^^^^^^^
136136

137137
error: `[const]` is not allowed here
138-
--> $DIR/tilde-const-invalid-places.rs:37:21
138+
--> $DIR/conditionally-const-invalid-places.rs:37:21
139139
|
140140
LL | const CONSTANT<T: [const] Trait>: () = ();
141141
| ^^^^^^^^^
142142
|
143143
= note: this item cannot have `[const]` trait bounds
144144

145145
error: `[const]` is not allowed here
146-
--> $DIR/tilde-const-invalid-places.rs:44:16
146+
--> $DIR/conditionally-const-invalid-places.rs:44:16
147147
|
148148
LL | type Type<T: [const] Trait> = ();
149149
| ^^^^^^^^^
150150
|
151151
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
153153
|
154154
LL | type Type<T: [const] Trait> = ();
155155
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
156156

157157
error: `[const]` is not allowed here
158-
--> $DIR/tilde-const-invalid-places.rs:46:28
158+
--> $DIR/conditionally-const-invalid-places.rs:46:28
159159
|
160160
LL | fn non_const_function<T: [const] Trait>() {}
161161
| ^^^^^^^^^
162162
|
163163
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
165165
|
166166
LL | fn non_const_function<T: [const] Trait>() {}
167167
| ^^^^^^^^^^^^^^^^^^
168168

169169
error: `[const]` is not allowed here
170-
--> $DIR/tilde-const-invalid-places.rs:47:21
170+
--> $DIR/conditionally-const-invalid-places.rs:47:21
171171
|
172172
LL | const CONSTANT<T: [const] Trait>: () = ();
173173
| ^^^^^^^^^
174174
|
175175
= note: this item cannot have `[const]` trait bounds
176176

177177
error: `[const]` is not allowed here
178-
--> $DIR/tilde-const-invalid-places.rs:52:13
178+
--> $DIR/conditionally-const-invalid-places.rs:52:13
179179
|
180180
LL | trait Child0: [const] Trait {}
181181
| ^^^^^^^^^
182182
|
183183
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
185185
|
186186
LL | trait Child0: [const] Trait {}
187187
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
188188

189189
error: `[const]` is not allowed here
190-
--> $DIR/tilde-const-invalid-places.rs:53:24
190+
--> $DIR/conditionally-const-invalid-places.rs:53:24
191191
|
192192
LL | trait Child1 where Self: [const] Trait {}
193193
| ^^^^^^^^^
194194
|
195195
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
197197
|
198198
LL | trait Child1 where Self: [const] Trait {}
199199
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
200200

201201
error: `[const]` is not allowed here
202-
--> $DIR/tilde-const-invalid-places.rs:56:7
202+
--> $DIR/conditionally-const-invalid-places.rs:56:7
203203
|
204204
LL | impl<T: [const] Trait> Trait for T {}
205205
| ^^^^^^^^^
206206
|
207207
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
209209
|
210210
LL | impl<T: [const] Trait> Trait for T {}
211211
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
212212

213213
error: `[const]` is not allowed here
214-
--> $DIR/tilde-const-invalid-places.rs:59:7
214+
--> $DIR/conditionally-const-invalid-places.rs:59:7
215215
|
216216
LL | impl<T: [const] Trait> Struct<T> {}
217217
| ^^^^^^^^^
218218
|
219219
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
221221
|
222222
LL | impl<T: [const] Trait> Struct<T> {}
223223
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
224224

225225
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
227227
|
228228
LL | 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

235235
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
237237
|
238238
LL | 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

245245
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
247247
|
248248
LL | 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

255255
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
257257
|
258258
LL | 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

265265
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
267267
|
268268
LL | 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

273273
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
275275
|
276276
LL | 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

285285
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
287287
|
288288
LL | type Type<T: [const] Trait> = ();
289289
| ^^
290290
|
291291
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
293293
|
294294
LL | type Type<T: [const] Trait>: [const] Trait;
295295
| ^^^^^^^^^^^^^ required by this bound in `NonConstTrait::Type`
296296

297297
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
299299
|
300300
LL | type Type<T: [const] Trait> = ();
301301
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/traits/const-traits/tilde-twice.stderr renamed to tests/ui/traits/const-traits/duplicate-constness.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: expected identifier, found `]`
2-
--> $DIR/tilde-twice.rs:5:27
2+
--> $DIR/duplicate-constness.rs:5:27
33
|
44
LL | struct S<T: [const] [const] Tr>;
55
| ^ expected identifier

0 commit comments

Comments
 (0)