Skip to content

Commit ce7480d

Browse files
committed
Add edition checks for some tests that had divergent output
In order to expose edition dependent divergences in some tests in the test suite, add explicit `edition` annotations. Some of these tests might require additional work to *avoid* the divergences, as they might have been unintentional. These are not exhaustive changes, purely opportunistic while looking at something else.
1 parent 8ffb2f1 commit ce7480d

File tree

42 files changed

+1176
-105
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+1176
-105
lines changed

tests/ui/did_you_mean/bad-assoc-ty.stderr renamed to tests/ui/did_you_mean/bad-assoc-ty.edition2015.stderr

Lines changed: 30 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: missing angle brackets in associated item path
2-
--> $DIR/bad-assoc-ty.rs:1:10
2+
--> $DIR/bad-assoc-ty.rs:5:10
33
|
44
LL | type A = [u8; 4]::AssocTy;
55
| ^^^^^^^
@@ -10,7 +10,7 @@ LL | type A = <[u8; 4]>::AssocTy;
1010
| + +
1111

1212
error: missing angle brackets in associated item path
13-
--> $DIR/bad-assoc-ty.rs:5:10
13+
--> $DIR/bad-assoc-ty.rs:9:10
1414
|
1515
LL | type B = [u8]::AssocTy;
1616
| ^^^^
@@ -21,7 +21,7 @@ LL | type B = <[u8]>::AssocTy;
2121
| + +
2222

2323
error: missing angle brackets in associated item path
24-
--> $DIR/bad-assoc-ty.rs:9:10
24+
--> $DIR/bad-assoc-ty.rs:13:10
2525
|
2626
LL | type C = (u8)::AssocTy;
2727
| ^^^^
@@ -32,7 +32,7 @@ LL | type C = <(u8)>::AssocTy;
3232
| + +
3333

3434
error: missing angle brackets in associated item path
35-
--> $DIR/bad-assoc-ty.rs:13:10
35+
--> $DIR/bad-assoc-ty.rs:17:10
3636
|
3737
LL | type D = (u8, u8)::AssocTy;
3838
| ^^^^^^^^
@@ -43,7 +43,7 @@ LL | type D = <(u8, u8)>::AssocTy;
4343
| + +
4444

4545
error: missing angle brackets in associated item path
46-
--> $DIR/bad-assoc-ty.rs:17:10
46+
--> $DIR/bad-assoc-ty.rs:21:10
4747
|
4848
LL | type E = _::AssocTy;
4949
| ^
@@ -54,7 +54,7 @@ LL | type E = <_>::AssocTy;
5454
| + +
5555

5656
error: missing angle brackets in associated item path
57-
--> $DIR/bad-assoc-ty.rs:21:19
57+
--> $DIR/bad-assoc-ty.rs:25:19
5858
|
5959
LL | type F = &'static (u8)::AssocTy;
6060
| ^^^^
@@ -65,7 +65,7 @@ LL | type F = &'static <(u8)>::AssocTy;
6565
| + +
6666

6767
error: missing angle brackets in associated item path
68-
--> $DIR/bad-assoc-ty.rs:27:10
68+
--> $DIR/bad-assoc-ty.rs:31:10
6969
|
7070
LL | type G = dyn 'static + (Send)::AssocTy;
7171
| ^^^^^^^^^^^^^^^^^^^^
@@ -76,7 +76,7 @@ LL | type G = <dyn 'static + (Send)>::AssocTy;
7676
| + +
7777

7878
error: missing angle brackets in associated item path
79-
--> $DIR/bad-assoc-ty.rs:46:10
79+
--> $DIR/bad-assoc-ty.rs:51:10
8080
|
8181
LL | type I = ty!()::AssocTy;
8282
| ^^^^^
@@ -87,7 +87,7 @@ LL | type I = <ty!()>::AssocTy;
8787
| + +
8888

8989
error: missing angle brackets in associated item path
90-
--> $DIR/bad-assoc-ty.rs:39:19
90+
--> $DIR/bad-assoc-ty.rs:44:19
9191
|
9292
LL | ($ty: ty) => ($ty::AssocTy);
9393
| ^^^
@@ -102,7 +102,7 @@ LL | ($ty: ty) => (<$ty>::AssocTy);
102102
| + +
103103

104104
error[E0223]: ambiguous associated type
105-
--> $DIR/bad-assoc-ty.rs:1:10
105+
--> $DIR/bad-assoc-ty.rs:5:10
106106
|
107107
LL | type A = [u8; 4]::AssocTy;
108108
| ^^^^^^^^^^^^^^^^
@@ -114,7 +114,7 @@ LL + type A = <[u8; 4] as Example>::AssocTy;
114114
|
115115

116116
error[E0223]: ambiguous associated type
117-
--> $DIR/bad-assoc-ty.rs:5:10
117+
--> $DIR/bad-assoc-ty.rs:9:10
118118
|
119119
LL | type B = [u8]::AssocTy;
120120
| ^^^^^^^^^^^^^
@@ -126,7 +126,7 @@ LL + type B = <[u8] as Example>::AssocTy;
126126
|
127127

128128
error[E0223]: ambiguous associated type
129-
--> $DIR/bad-assoc-ty.rs:9:10
129+
--> $DIR/bad-assoc-ty.rs:13:10
130130
|
131131
LL | type C = (u8)::AssocTy;
132132
| ^^^^^^^^^^^^^
@@ -138,7 +138,7 @@ LL + type C = <u8 as Example>::AssocTy;
138138
|
139139

140140
error[E0223]: ambiguous associated type
141-
--> $DIR/bad-assoc-ty.rs:13:10
141+
--> $DIR/bad-assoc-ty.rs:17:10
142142
|
143143
LL | type D = (u8, u8)::AssocTy;
144144
| ^^^^^^^^^^^^^^^^^
@@ -150,13 +150,13 @@ LL + type D = <(u8, u8) as Example>::AssocTy;
150150
|
151151

152152
error[E0121]: the placeholder `_` is not allowed within types on item signatures for type aliases
153-
--> $DIR/bad-assoc-ty.rs:17:10
153+
--> $DIR/bad-assoc-ty.rs:21:10
154154
|
155155
LL | type E = _::AssocTy;
156156
| ^ not allowed in type signatures
157157

158158
error[E0223]: ambiguous associated type
159-
--> $DIR/bad-assoc-ty.rs:21:19
159+
--> $DIR/bad-assoc-ty.rs:25:19
160160
|
161161
LL | type F = &'static (u8)::AssocTy;
162162
| ^^^^^^^^^^^^^
@@ -168,7 +168,7 @@ LL + type F = &'static <u8 as Example>::AssocTy;
168168
|
169169

170170
error[E0223]: ambiguous associated type
171-
--> $DIR/bad-assoc-ty.rs:27:10
171+
--> $DIR/bad-assoc-ty.rs:31:10
172172
|
173173
LL | type G = dyn 'static + (Send)::AssocTy;
174174
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -180,7 +180,7 @@ LL + type G = <(dyn Send + 'static) as Example>::AssocTy;
180180
|
181181

182182
warning: trait objects without an explicit `dyn` are deprecated
183-
--> $DIR/bad-assoc-ty.rs:33:10
183+
--> $DIR/bad-assoc-ty.rs:37:10
184184
|
185185
LL | type H = Fn(u8) -> (u8)::Output;
186186
| ^^^^^^^^^^^^^^
@@ -194,7 +194,7 @@ LL | type H = <dyn Fn(u8) -> (u8)>::Output;
194194
| ++++ +
195195

196196
error[E0223]: ambiguous associated type
197-
--> $DIR/bad-assoc-ty.rs:33:10
197+
--> $DIR/bad-assoc-ty.rs:37:10
198198
|
199199
LL | type H = Fn(u8) -> (u8)::Output;
200200
| ^^^^^^^^^^^^^^^^^^^^^^
@@ -209,7 +209,7 @@ LL + type H = <(dyn Fn(u8) -> u8 + 'static) as IntoFuture>::Output;
209209
|
210210

211211
error[E0223]: ambiguous associated type
212-
--> $DIR/bad-assoc-ty.rs:39:19
212+
--> $DIR/bad-assoc-ty.rs:44:19
213213
|
214214
LL | ($ty: ty) => ($ty::AssocTy);
215215
| ^^^^^^^^^^^^
@@ -225,7 +225,7 @@ LL + ($ty: ty) => (<u8 as Example>::AssocTy);
225225
|
226226

227227
error[E0223]: ambiguous associated type
228-
--> $DIR/bad-assoc-ty.rs:46:10
228+
--> $DIR/bad-assoc-ty.rs:51:10
229229
|
230230
LL | type I = ty!()::AssocTy;
231231
| ^^^^^^^^^^^^^^
@@ -237,15 +237,15 @@ LL + type I = <u8 as Example>::AssocTy;
237237
|
238238

239239
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
240-
--> $DIR/bad-assoc-ty.rs:51:13
240+
--> $DIR/bad-assoc-ty.rs:56:13
241241
|
242242
LL | fn foo<X: K<_, _>>(x: X) {}
243243
| ^ ^ not allowed in type signatures
244244
| |
245245
| not allowed in type signatures
246246

247247
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
248-
--> $DIR/bad-assoc-ty.rs:54:34
248+
--> $DIR/bad-assoc-ty.rs:59:34
249249
|
250250
LL | fn bar<F>(_: F) where F: Fn() -> _ {}
251251
| ^ not allowed in type signatures
@@ -257,7 +257,7 @@ LL + fn bar<F, T>(_: F) where F: Fn() -> T {}
257257
|
258258

259259
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
260-
--> $DIR/bad-assoc-ty.rs:57:19
260+
--> $DIR/bad-assoc-ty.rs:62:19
261261
|
262262
LL | fn baz<F: Fn() -> _>(_: F) {}
263263
| ^ not allowed in type signatures
@@ -269,7 +269,7 @@ LL + fn baz<F: Fn() -> T, T>(_: F) {}
269269
|
270270

271271
error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
272-
--> $DIR/bad-assoc-ty.rs:60:33
272+
--> $DIR/bad-assoc-ty.rs:65:33
273273
|
274274
LL | struct L<F>(F) where F: Fn() -> _;
275275
| ^ not allowed in type signatures
@@ -281,7 +281,7 @@ LL + struct L<F, T>(F) where F: Fn() -> T;
281281
|
282282

283283
error[E0121]: the placeholder `_` is not allowed within types on item signatures for functions
284-
--> $DIR/bad-assoc-ty.rs:82:38
284+
--> $DIR/bad-assoc-ty.rs:87:38
285285
|
286286
LL | fn foo<F>(_: F) where F: Fn() -> _ {}
287287
| ^ not allowed in type signatures
@@ -293,7 +293,7 @@ LL + fn foo<F, T>(_: F) where F: Fn() -> T {}
293293
|
294294

295295
error[E0121]: the placeholder `_` is not allowed within types on item signatures for structs
296-
--> $DIR/bad-assoc-ty.rs:62:30
296+
--> $DIR/bad-assoc-ty.rs:67:30
297297
|
298298
LL | struct M<F> where F: Fn() -> _ {
299299
| ^ not allowed in type signatures
@@ -305,7 +305,7 @@ LL + struct M<F, T> where F: Fn() -> T {
305305
|
306306

307307
error[E0121]: the placeholder `_` is not allowed within types on item signatures for enums
308-
--> $DIR/bad-assoc-ty.rs:66:28
308+
--> $DIR/bad-assoc-ty.rs:71:28
309309
|
310310
LL | enum N<F> where F: Fn() -> _ {
311311
| ^ not allowed in type signatures
@@ -317,7 +317,7 @@ LL + enum N<F, T> where F: Fn() -> T {
317317
|
318318

319319
error[E0121]: the placeholder `_` is not allowed within types on item signatures for unions
320-
--> $DIR/bad-assoc-ty.rs:71:29
320+
--> $DIR/bad-assoc-ty.rs:76:29
321321
|
322322
LL | union O<F> where F: Fn() -> _ {
323323
| ^ not allowed in type signatures
@@ -329,7 +329,7 @@ LL + union O<F, T> where F: Fn() -> T {
329329
|
330330

331331
error[E0740]: field must implement `Copy` or be wrapped in `ManuallyDrop<...>` to be used in a union
332-
--> $DIR/bad-assoc-ty.rs:73:5
332+
--> $DIR/bad-assoc-ty.rs:78:5
333333
|
334334
LL | foo: F,
335335
| ^^^^^^
@@ -341,7 +341,7 @@ LL | foo: std::mem::ManuallyDrop<F>,
341341
| +++++++++++++++++++++++ +
342342

343343
error[E0121]: the placeholder `_` is not allowed within types on item signatures for traits
344-
--> $DIR/bad-assoc-ty.rs:77:29
344+
--> $DIR/bad-assoc-ty.rs:82:29
345345
|
346346
LL | trait P<F> where F: Fn() -> _ {
347347
| ^ not allowed in type signatures

0 commit comments

Comments
 (0)