Skip to content

Commit 036621a

Browse files
tests: Upgrade unstable ABIs to errors in unsupported ABI test
1 parent 39ff79b commit 036621a

File tree

7 files changed

+599
-1375
lines changed

7 files changed

+599
-1375
lines changed

tests/ui/abi/unsupported.aarch64.stderr

Lines changed: 108 additions & 249 deletions
Large diffs are not rendered by default.

tests/ui/abi/unsupported.arm.stderr

Lines changed: 97 additions & 224 deletions
Original file line numberDiff line numberDiff line change
@@ -1,286 +1,159 @@
1-
warning: the calling convention "ptx-kernel" is not supported on this target
2-
--> $DIR/unsupported.rs:35:15
1+
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
2+
--> $DIR/unsupported.rs:33:8
33
|
4-
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^
4+
LL | extern "ptx-kernel" fn ptx() {}
5+
| ^^^^^^^^^^^^
6+
7+
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
8+
--> $DIR/unsupported.rs:35:22
69
|
7-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
8-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
9-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
10+
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
11+
| ^^^^^^^^^^^^
1012

1113
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
12-
--> $DIR/unsupported.rs:40:1
14+
--> $DIR/unsupported.rs:39:8
1315
|
1416
LL | extern "ptx-kernel" {}
15-
| ^^^^^^^^^^^^^^^^^^^^^^
17+
| ^^^^^^^^^^^^
1618

17-
warning: the calling convention "msp430-interrupt" is not supported on this target
18-
--> $DIR/unsupported.rs:73:18
19+
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
20+
--> $DIR/unsupported.rs:41:8
1921
|
20-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
21-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22+
LL | extern "gpu-kernel" fn gpu() {}
23+
| ^^^^^^^^^^^^
24+
25+
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
26+
--> $DIR/unsupported.rs:65:8
27+
|
28+
LL | extern "msp430-interrupt" fn msp430() {}
29+
| ^^^^^^^^^^^^^^^^^^
30+
31+
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
32+
--> $DIR/unsupported.rs:67:25
2233
|
23-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
24-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
34+
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
35+
| ^^^^^^^^^^^^^^^^^^
2536

2637
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
27-
--> $DIR/unsupported.rs:78:1
38+
--> $DIR/unsupported.rs:71:8
2839
|
2940
LL | extern "msp430-interrupt" {}
30-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
41+
| ^^^^^^^^^^^^^^^^^^
3142

32-
warning: the calling convention "avr-interrupt" is not supported on this target
33-
--> $DIR/unsupported.rs:83:15
43+
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
44+
--> $DIR/unsupported.rs:74:8
3445
|
35-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
36-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
LL | extern "avr-interrupt" fn avr() {}
47+
| ^^^^^^^^^^^^^^^
48+
49+
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
50+
--> $DIR/unsupported.rs:76:22
3751
|
38-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
39-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
52+
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
53+
| ^^^^^^^^^^^^^^^
4054

4155
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
42-
--> $DIR/unsupported.rs:88:1
56+
--> $DIR/unsupported.rs:80:8
4357
|
4458
LL | extern "avr-interrupt" {}
45-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
59+
| ^^^^^^^^^^^^^^^
4660

47-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
48-
--> $DIR/unsupported.rs:96:17
61+
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
62+
--> $DIR/unsupported.rs:83:8
4963
|
50-
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
51-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
LL | extern "riscv-interrupt-m" fn riscv() {}
65+
| ^^^^^^^^^^^^^^^^^^^
66+
67+
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
68+
--> $DIR/unsupported.rs:88:24
5269
|
53-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
54-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
70+
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
71+
| ^^^^^^^^^^^^^^^^^^^
5572

5673
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
57-
--> $DIR/unsupported.rs:107:1
74+
--> $DIR/unsupported.rs:95:8
5875
|
5976
LL | extern "riscv-interrupt-m" {}
60-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
77+
| ^^^^^^^^^^^^^^^^^^^
6178

62-
warning: the calling convention "x86-interrupt" is not supported on this target
63-
--> $DIR/unsupported.rs:118:15
79+
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
80+
--> $DIR/unsupported.rs:101:8
6481
|
65-
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
66-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
82+
LL | extern "x86-interrupt" fn x86() {}
83+
| ^^^^^^^^^^^^^^^
84+
85+
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
86+
--> $DIR/unsupported.rs:106:22
6787
|
68-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
69-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
88+
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
89+
| ^^^^^^^^^^^^^^^
7090

7191
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
72-
--> $DIR/unsupported.rs:129:1
92+
--> $DIR/unsupported.rs:113:8
7393
|
7494
LL | extern "x86-interrupt" {}
75-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
95+
| ^^^^^^^^^^^^^^^
7696

77-
warning: the calling convention "thiscall" is not supported on this target
78-
--> $DIR/unsupported.rs:141:20
97+
error[E0570]: `"thiscall"` is not a supported ABI for the current target
98+
--> $DIR/unsupported.rs:119:8
7999
|
80-
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
81-
| ^^^^^^^^^^^^^^^^^^^^^^
100+
LL | extern "thiscall" fn thiscall() {}
101+
| ^^^^^^^^^^
102+
103+
error[E0570]: `"thiscall"` is not a supported ABI for the current target
104+
--> $DIR/unsupported.rs:125:27
82105
|
83-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
84-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
106+
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
107+
| ^^^^^^^^^^
85108

86109
error[E0570]: `"thiscall"` is not a supported ABI for the current target
87-
--> $DIR/unsupported.rs:154:1
110+
--> $DIR/unsupported.rs:133:8
88111
|
89112
LL | extern "thiscall" {}
90-
| ^^^^^^^^^^^^^^^^^^^^
113+
| ^^^^^^^^^^
91114

92-
warning: the calling convention "stdcall" is not supported on this target
93-
--> $DIR/unsupported.rs:167:19
115+
error[E0570]: `"stdcall"` is not a supported ABI for the current target
116+
--> $DIR/unsupported.rs:140:8
94117
|
95-
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
96-
| ^^^^^^^^^^^^^^^^^^^^^
118+
LL | extern "stdcall" fn stdcall() {}
119+
| ^^^^^^^^^
120+
121+
error[E0570]: `"stdcall"` is not a supported ABI for the current target
122+
--> $DIR/unsupported.rs:146:26
97123
|
98-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
99-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
124+
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
125+
| ^^^^^^^^^
100126

101127
error[E0570]: `"stdcall"` is not a supported ABI for the current target
102-
--> $DIR/unsupported.rs:180:1
128+
--> $DIR/unsupported.rs:154:8
103129
|
104130
LL | extern "stdcall" {}
105-
| ^^^^^^^^^^^^^^^^^^^
131+
| ^^^^^^^^^
106132

107-
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
108-
--> $DIR/unsupported.rs:187:21
133+
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
134+
--> $DIR/unsupported.rs:161:28
109135
|
110136
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
111-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112-
|
113-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
114-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
115-
116-
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
117-
--> $DIR/unsupported.rs:195:22
118-
|
119-
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
120-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121-
|
122-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
123-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
137+
| ^^^^^^^^^^^^^^^^^^^^^^^
124138

125139
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
126-
--> $DIR/unsupported.rs:200:1
127-
|
128-
LL | extern "C-cmse-nonsecure-entry" {}
129-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130-
131-
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
132-
--> $DIR/unsupported.rs:33:1
140+
--> $DIR/unsupported.rs:166:8
133141
|
134-
LL | extern "ptx-kernel" fn ptx() {}
135-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
136-
137-
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
138-
--> $DIR/unsupported.rs:42:1
139-
|
140-
LL | extern "gpu-kernel" fn gpu() {}
141-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142-
143-
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
144-
--> $DIR/unsupported.rs:71:1
145-
|
146-
LL | extern "msp430-interrupt" fn msp430() {}
147-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148-
149-
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
150-
--> $DIR/unsupported.rs:81:1
151-
|
152-
LL | extern "avr-interrupt" fn avr() {}
153-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154-
155-
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
156-
--> $DIR/unsupported.rs:91:1
157-
|
158-
LL | extern "riscv-interrupt-m" fn riscv() {}
159-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
160-
161-
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
162-
--> $DIR/unsupported.rs:113:1
163-
|
164-
LL | extern "x86-interrupt" fn x86() {}
165-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
166-
167-
error[E0570]: `"thiscall"` is not a supported ABI for the current target
168-
--> $DIR/unsupported.rs:135:1
169-
|
170-
LL | extern "thiscall" fn thiscall() {}
171-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
142+
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
143+
| ^^^^^^^^^^^^^^^^^^^^^^^^
172144

173-
error[E0570]: `"stdcall"` is not a supported ABI for the current target
174-
--> $DIR/unsupported.rs:161:1
145+
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
146+
--> $DIR/unsupported.rs:168:29
175147
|
176-
LL | extern "stdcall" fn stdcall() {}
177-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
148+
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
149+
| ^^^^^^^^^^^^^^^^^^^^^^^^
178150

179151
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
180-
--> $DIR/unsupported.rs:193:1
152+
--> $DIR/unsupported.rs:172:8
181153
|
182-
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
183-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
154+
LL | extern "C-cmse-nonsecure-entry" {}
155+
| ^^^^^^^^^^^^^^^^^^^^^^^^
184156

185-
error: aborting due to 17 previous errors; 9 warnings emitted
157+
error: aborting due to 26 previous errors
186158

187159
For more information about this error, try `rustc --explain E0570`.
188-
Future incompatibility report: Future breakage diagnostic:
189-
warning: the calling convention "ptx-kernel" is not supported on this target
190-
--> $DIR/unsupported.rs:35:15
191-
|
192-
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
193-
| ^^^^^^^^^^^^^^^^^^^^^^^^
194-
|
195-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
196-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
197-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
198-
199-
Future breakage diagnostic:
200-
warning: the calling convention "msp430-interrupt" is not supported on this target
201-
--> $DIR/unsupported.rs:73:18
202-
|
203-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
204-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
205-
|
206-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
207-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
208-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
209-
210-
Future breakage diagnostic:
211-
warning: the calling convention "avr-interrupt" is not supported on this target
212-
--> $DIR/unsupported.rs:83:15
213-
|
214-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
215-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
216-
|
217-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
218-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
219-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
220-
221-
Future breakage diagnostic:
222-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
223-
--> $DIR/unsupported.rs:96:17
224-
|
225-
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
226-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
227-
|
228-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
229-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
230-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
231-
232-
Future breakage diagnostic:
233-
warning: the calling convention "x86-interrupt" is not supported on this target
234-
--> $DIR/unsupported.rs:118:15
235-
|
236-
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
237-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
238-
|
239-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
240-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
241-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
242-
243-
Future breakage diagnostic:
244-
warning: the calling convention "thiscall" is not supported on this target
245-
--> $DIR/unsupported.rs:141:20
246-
|
247-
LL | fn thiscall_ptr(f: extern "thiscall" fn()) {
248-
| ^^^^^^^^^^^^^^^^^^^^^^
249-
|
250-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
251-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
252-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
253-
254-
Future breakage diagnostic:
255-
warning: the calling convention "stdcall" is not supported on this target
256-
--> $DIR/unsupported.rs:167:19
257-
|
258-
LL | fn stdcall_ptr(f: extern "stdcall" fn()) {
259-
| ^^^^^^^^^^^^^^^^^^^^^
260-
|
261-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
262-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
263-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
264-
265-
Future breakage diagnostic:
266-
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
267-
--> $DIR/unsupported.rs:187:21
268-
|
269-
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
270-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
271-
|
272-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
273-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
274-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
275-
276-
Future breakage diagnostic:
277-
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
278-
--> $DIR/unsupported.rs:195:22
279-
|
280-
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
281-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
282-
|
283-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
284-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
285-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
286-

0 commit comments

Comments
 (0)