Skip to content

Commit 0df01a0

Browse files
tests: bless unsupported_calling_conventions linting on some fn_ptrs
1 parent 580a955 commit 0df01a0

8 files changed

+182
-166
lines changed

tests/ui/abi/unsupported.aarch64.stderr

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -114,43 +114,44 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
114114
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
115115

116116
error[E0570]: `"stdcall"` is not a supported ABI for the current target
117-
--> $DIR/unsupported.rs:117:1
117+
--> $DIR/unsupported.rs:119:1
118118
|
119119
LL | extern "stdcall" {}
120120
| ^^^^^^^^^^^^^^^^^^^
121121
|
122122
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
123123

124124
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
125-
--> $DIR/unsupported.rs:121:1
125+
--> $DIR/unsupported.rs:123:1
126126
|
127127
LL | extern "stdcall-unwind" {}
128128
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
129129
|
130130
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
131131

132-
warning: the calling convention "cdecl" is not supported on this target
133-
--> $DIR/unsupported.rs:129:17
132+
warning: use of calling convention not supported on this target
133+
--> $DIR/unsupported.rs:131:17
134134
|
135135
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
136136
| ^^^^^^^^^^^^^^^^^^^
137137
|
138138
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
139-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
139+
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
140+
= help: use `extern "C"` instead
141+
= note: `#[warn(unsupported_calling_conventions)]` on by default
140142

141143
warning: use of calling convention not supported on this target
142-
--> $DIR/unsupported.rs:134:1
144+
--> $DIR/unsupported.rs:136:1
143145
|
144146
LL | extern "cdecl" {}
145147
| ^^^^^^^^^^^^^^^^^
146148
|
147149
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
148150
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
149151
= help: use `extern "C"` instead
150-
= note: `#[warn(unsupported_calling_conventions)]` on by default
151152

152153
warning: use of calling convention not supported on this target
153-
--> $DIR/unsupported.rs:137:1
154+
--> $DIR/unsupported.rs:139:1
154155
|
155156
LL | extern "cdecl-unwind" {}
156157
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -160,7 +161,7 @@ LL | extern "cdecl-unwind" {}
160161
= help: use `extern "C-unwind"` instead
161162

162163
warning: the calling convention "vectorcall" is not supported on this target
163-
--> $DIR/unsupported.rs:143:22
164+
--> $DIR/unsupported.rs:145:22
164165
|
165166
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
166167
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -169,13 +170,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
169170
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
170171

171172
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
172-
--> $DIR/unsupported.rs:148:1
173+
--> $DIR/unsupported.rs:150:1
173174
|
174175
LL | extern "vectorcall" {}
175176
| ^^^^^^^^^^^^^^^^^^^^^^
176177

177178
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
178-
--> $DIR/unsupported.rs:151:21
179+
--> $DIR/unsupported.rs:153:21
179180
|
180181
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
181182
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -184,7 +185,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
184185
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
185186

186187
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
187-
--> $DIR/unsupported.rs:159:22
188+
--> $DIR/unsupported.rs:161:22
188189
|
189190
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
190191
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -193,7 +194,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
193194
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
194195

195196
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
196-
--> $DIR/unsupported.rs:164:1
197+
--> $DIR/unsupported.rs:166:1
197198
|
198199
LL | extern "C-cmse-nonsecure-entry" {}
199200
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -255,7 +256,7 @@ LL | extern "stdcall" fn stdcall() {}
255256
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
256257

257258
warning: use of calling convention not supported on this target
258-
--> $DIR/unsupported.rs:126:1
259+
--> $DIR/unsupported.rs:128:1
259260
|
260261
LL | extern "cdecl" fn cdecl() {}
261262
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -265,13 +266,13 @@ LL | extern "cdecl" fn cdecl() {}
265266
= help: use `extern "C"` instead
266267

267268
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
268-
--> $DIR/unsupported.rs:141:1
269+
--> $DIR/unsupported.rs:143:1
269270
|
270271
LL | extern "vectorcall" fn vectorcall() {}
271272
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
272273

273274
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
274-
--> $DIR/unsupported.rs:157:1
275+
--> $DIR/unsupported.rs:159:1
275276
|
276277
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
277278
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -368,19 +369,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
368369
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
369370

370371
Future breakage diagnostic:
371-
warning: the calling convention "cdecl" is not supported on this target
372-
--> $DIR/unsupported.rs:129:17
372+
warning: use of calling convention not supported on this target
373+
--> $DIR/unsupported.rs:131:17
373374
|
374375
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
375376
| ^^^^^^^^^^^^^^^^^^^
376377
|
377378
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
378-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
379-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
379+
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
380+
= help: use `extern "C"` instead
381+
= note: `#[warn(unsupported_calling_conventions)]` on by default
380382

381383
Future breakage diagnostic:
382384
warning: use of calling convention not supported on this target
383-
--> $DIR/unsupported.rs:134:1
385+
--> $DIR/unsupported.rs:136:1
384386
|
385387
LL | extern "cdecl" {}
386388
| ^^^^^^^^^^^^^^^^^
@@ -392,7 +394,7 @@ LL | extern "cdecl" {}
392394

393395
Future breakage diagnostic:
394396
warning: use of calling convention not supported on this target
395-
--> $DIR/unsupported.rs:137:1
397+
--> $DIR/unsupported.rs:139:1
396398
|
397399
LL | extern "cdecl-unwind" {}
398400
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -404,7 +406,7 @@ LL | extern "cdecl-unwind" {}
404406

405407
Future breakage diagnostic:
406408
warning: the calling convention "vectorcall" is not supported on this target
407-
--> $DIR/unsupported.rs:143:22
409+
--> $DIR/unsupported.rs:145:22
408410
|
409411
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
410412
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -415,7 +417,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
415417

416418
Future breakage diagnostic:
417419
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
418-
--> $DIR/unsupported.rs:151:21
420+
--> $DIR/unsupported.rs:153:21
419421
|
420422
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
421423
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -426,7 +428,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
426428

427429
Future breakage diagnostic:
428430
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
429-
--> $DIR/unsupported.rs:159:22
431+
--> $DIR/unsupported.rs:161:22
430432
|
431433
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
432434
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -437,7 +439,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
437439

438440
Future breakage diagnostic:
439441
warning: use of calling convention not supported on this target
440-
--> $DIR/unsupported.rs:126:1
442+
--> $DIR/unsupported.rs:128:1
441443
|
442444
LL | extern "cdecl" fn cdecl() {}
443445
| ^^^^^^^^^^^^^^^^^^^^^^^^^

tests/ui/abi/unsupported.arm.stderr

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -99,43 +99,44 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
9999
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
100100

101101
error[E0570]: `"stdcall"` is not a supported ABI for the current target
102-
--> $DIR/unsupported.rs:117:1
102+
--> $DIR/unsupported.rs:119:1
103103
|
104104
LL | extern "stdcall" {}
105105
| ^^^^^^^^^^^^^^^^^^^
106106
|
107107
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
108108

109109
error[E0570]: `"stdcall-unwind"` is not a supported ABI for the current target
110-
--> $DIR/unsupported.rs:121:1
110+
--> $DIR/unsupported.rs:123:1
111111
|
112112
LL | extern "stdcall-unwind" {}
113113
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
114114
|
115115
= help: if you need `extern "stdcall-unwind"` on win32 and `extern "C-unwind"` everywhere else, use `extern "system-unwind"`
116116

117-
warning: the calling convention "cdecl" is not supported on this target
118-
--> $DIR/unsupported.rs:129:17
117+
warning: use of calling convention not supported on this target
118+
--> $DIR/unsupported.rs:131:17
119119
|
120120
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
121121
| ^^^^^^^^^^^^^^^^^^^
122122
|
123123
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
124-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
124+
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
125+
= help: use `extern "C"` instead
126+
= note: `#[warn(unsupported_calling_conventions)]` on by default
125127

126128
warning: use of calling convention not supported on this target
127-
--> $DIR/unsupported.rs:134:1
129+
--> $DIR/unsupported.rs:136:1
128130
|
129131
LL | extern "cdecl" {}
130132
| ^^^^^^^^^^^^^^^^^
131133
|
132134
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
133135
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
134136
= help: use `extern "C"` instead
135-
= note: `#[warn(unsupported_calling_conventions)]` on by default
136137

137138
warning: use of calling convention not supported on this target
138-
--> $DIR/unsupported.rs:137:1
139+
--> $DIR/unsupported.rs:139:1
139140
|
140141
LL | extern "cdecl-unwind" {}
141142
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +146,7 @@ LL | extern "cdecl-unwind" {}
145146
= help: use `extern "C-unwind"` instead
146147

147148
warning: the calling convention "vectorcall" is not supported on this target
148-
--> $DIR/unsupported.rs:143:22
149+
--> $DIR/unsupported.rs:145:22
149150
|
150151
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
151152
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -154,13 +155,13 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
154155
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
155156

156157
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
157-
--> $DIR/unsupported.rs:148:1
158+
--> $DIR/unsupported.rs:150:1
158159
|
159160
LL | extern "vectorcall" {}
160161
| ^^^^^^^^^^^^^^^^^^^^^^
161162

162163
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
163-
--> $DIR/unsupported.rs:151:21
164+
--> $DIR/unsupported.rs:153:21
164165
|
165166
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
166167
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -169,7 +170,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
169170
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
170171

171172
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
172-
--> $DIR/unsupported.rs:159:22
173+
--> $DIR/unsupported.rs:161:22
173174
|
174175
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
175176
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -178,7 +179,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
178179
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
179180

180181
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
181-
--> $DIR/unsupported.rs:164:1
182+
--> $DIR/unsupported.rs:166:1
182183
|
183184
LL | extern "C-cmse-nonsecure-entry" {}
184185
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -234,7 +235,7 @@ LL | extern "stdcall" fn stdcall() {}
234235
= help: if you need `extern "stdcall"` on win32 and `extern "C"` everywhere else, use `extern "system"`
235236

236237
warning: use of calling convention not supported on this target
237-
--> $DIR/unsupported.rs:126:1
238+
--> $DIR/unsupported.rs:128:1
238239
|
239240
LL | extern "cdecl" fn cdecl() {}
240241
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -244,13 +245,13 @@ LL | extern "cdecl" fn cdecl() {}
244245
= help: use `extern "C"` instead
245246

246247
error[E0570]: `"vectorcall"` is not a supported ABI for the current target
247-
--> $DIR/unsupported.rs:141:1
248+
--> $DIR/unsupported.rs:143:1
248249
|
249250
LL | extern "vectorcall" fn vectorcall() {}
250251
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
251252

252253
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
253-
--> $DIR/unsupported.rs:157:1
254+
--> $DIR/unsupported.rs:159:1
254255
|
255256
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
256257
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -336,19 +337,20 @@ LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
336337
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
337338

338339
Future breakage diagnostic:
339-
warning: the calling convention "cdecl" is not supported on this target
340-
--> $DIR/unsupported.rs:129:17
340+
warning: use of calling convention not supported on this target
341+
--> $DIR/unsupported.rs:131:17
341342
|
342343
LL | fn cdecl_ptr(f: extern "cdecl" fn()) {
343344
| ^^^^^^^^^^^^^^^^^^^
344345
|
345346
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
346-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
347-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
347+
= note: for more information, see issue #137018 <https://github.com/rust-lang/rust/issues/137018>
348+
= help: use `extern "C"` instead
349+
= note: `#[warn(unsupported_calling_conventions)]` on by default
348350

349351
Future breakage diagnostic:
350352
warning: use of calling convention not supported on this target
351-
--> $DIR/unsupported.rs:134:1
353+
--> $DIR/unsupported.rs:136:1
352354
|
353355
LL | extern "cdecl" {}
354356
| ^^^^^^^^^^^^^^^^^
@@ -360,7 +362,7 @@ LL | extern "cdecl" {}
360362

361363
Future breakage diagnostic:
362364
warning: use of calling convention not supported on this target
363-
--> $DIR/unsupported.rs:137:1
365+
--> $DIR/unsupported.rs:139:1
364366
|
365367
LL | extern "cdecl-unwind" {}
366368
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -372,7 +374,7 @@ LL | extern "cdecl-unwind" {}
372374

373375
Future breakage diagnostic:
374376
warning: the calling convention "vectorcall" is not supported on this target
375-
--> $DIR/unsupported.rs:143:22
377+
--> $DIR/unsupported.rs:145:22
376378
|
377379
LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
378380
| ^^^^^^^^^^^^^^^^^^^^^^^^
@@ -383,7 +385,7 @@ LL | fn vectorcall_ptr(f: extern "vectorcall" fn()) {
383385

384386
Future breakage diagnostic:
385387
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
386-
--> $DIR/unsupported.rs:151:21
388+
--> $DIR/unsupported.rs:153:21
387389
|
388390
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
389391
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -394,7 +396,7 @@ LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
394396

395397
Future breakage diagnostic:
396398
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
397-
--> $DIR/unsupported.rs:159:22
399+
--> $DIR/unsupported.rs:161:22
398400
|
399401
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
400402
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -405,7 +407,7 @@ LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
405407

406408
Future breakage diagnostic:
407409
warning: use of calling convention not supported on this target
408-
--> $DIR/unsupported.rs:126:1
410+
--> $DIR/unsupported.rs:128:1
409411
|
410412
LL | extern "cdecl" fn cdecl() {}
411413
| ^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)