Skip to content

Commit a6b07d1

Browse files
tests: Upgrade unstable ABIs to errors in unsupported ABI test
1 parent a58f692 commit a6b07d1

8 files changed

+841
-1901
lines changed

tests/ui/abi/unsupported.aarch64.stderr

Lines changed: 141 additions & 314 deletions
Large diffs are not rendered by default.

tests/ui/abi/unsupported.arm.stderr

Lines changed: 130 additions & 289 deletions
Large diffs are not rendered by default.

tests/ui/abi/unsupported.i686.stderr

Lines changed: 75 additions & 174 deletions
Original file line numberDiff line numberDiff line change
@@ -1,222 +1,123 @@
1-
warning: the calling convention "ptx-kernel" is not supported on this target
2-
--> $DIR/unsupported.rs:38:15
1+
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
2+
--> $DIR/unsupported.rs:36: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:38: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:43:1
14+
--> $DIR/unsupported.rs:42:8
1315
|
1416
LL | extern "ptx-kernel" {}
15-
| ^^^^^^^^^^^^^^^^^^^^^^
17+
| ^^^^^^^^^^^^
1618

17-
warning: the calling convention "aapcs" is not supported on this target
18-
--> $DIR/unsupported.rs:50:17
19+
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
20+
--> $DIR/unsupported.rs:44:8
1921
|
20-
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
21-
| ^^^^^^^^^^^^^^^^^^^
22+
LL | extern "gpu-kernel" fn gpu() {}
23+
| ^^^^^^^^^^^^
24+
25+
error[E0570]: `"aapcs"` is not a supported ABI for the current target
26+
--> $DIR/unsupported.rs:47:8
27+
|
28+
LL | extern "aapcs" fn aapcs() {}
29+
| ^^^^^^^
30+
31+
error[E0570]: `"aapcs"` is not a supported ABI for the current target
32+
--> $DIR/unsupported.rs:49:24
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 aapcs_ptr(f: extern "aapcs" fn()) {
35+
| ^^^^^^^
2536

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

32-
warning: the calling convention "msp430-interrupt" is not supported on this target
33-
--> $DIR/unsupported.rs:60:18
43+
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
44+
--> $DIR/unsupported.rs:56:8
3445
|
35-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
36-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
LL | extern "msp430-interrupt" fn msp430() {}
47+
| ^^^^^^^^^^^^^^^^^^
48+
49+
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
50+
--> $DIR/unsupported.rs:58:25
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 msp430_ptr(f: extern "msp430-interrupt" fn()) {
53+
| ^^^^^^^^^^^^^^^^^^
4054

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

47-
warning: the calling convention "avr-interrupt" is not supported on this target
48-
--> $DIR/unsupported.rs:70:15
61+
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
62+
--> $DIR/unsupported.rs:65:8
4963
|
50-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
51-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
64+
LL | extern "avr-interrupt" fn avr() {}
65+
| ^^^^^^^^^^^^^^^
66+
67+
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
68+
--> $DIR/unsupported.rs:67:22
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 avr_ptr(f: extern "avr-interrupt" fn()) {
71+
| ^^^^^^^^^^^^^^^
5572

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

62-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
63-
--> $DIR/unsupported.rs:80:17
79+
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
80+
--> $DIR/unsupported.rs:74:8
6481
|
65-
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
66-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82+
LL | extern "riscv-interrupt-m" fn riscv() {}
83+
| ^^^^^^^^^^^^^^^^^^^
84+
85+
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
86+
--> $DIR/unsupported.rs:76:24
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 riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
89+
| ^^^^^^^^^^^^^^^^^^^
7090

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

77-
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
78-
--> $DIR/unsupported.rs:151:21
97+
error[E0570]: `"C-cmse-nonsecure-call"` is not a supported ABI for the current target
98+
--> $DIR/unsupported.rs:140:28
7999
|
80100
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
81-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82-
|
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>
85-
86-
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
87-
--> $DIR/unsupported.rs:159:22
88-
|
89-
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
90-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
91-
|
92-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
93-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
101+
| ^^^^^^^^^^^^^^^^^^^^^^^
94102

95103
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
96-
--> $DIR/unsupported.rs:164:1
97-
|
98-
LL | extern "C-cmse-nonsecure-entry" {}
99-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
100-
101-
error[E0570]: `"ptx-kernel"` is not a supported ABI for the current target
102-
--> $DIR/unsupported.rs:36:1
103-
|
104-
LL | extern "ptx-kernel" fn ptx() {}
105-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106-
107-
error[E0570]: `"gpu-kernel"` is not a supported ABI for the current target
108-
--> $DIR/unsupported.rs:45:1
104+
--> $DIR/unsupported.rs:145:8
109105
|
110-
LL | extern "gpu-kernel" fn gpu() {}
111-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112-
113-
error[E0570]: `"aapcs"` is not a supported ABI for the current target
114-
--> $DIR/unsupported.rs:48:1
115-
|
116-
LL | extern "aapcs" fn aapcs() {}
117-
| ^^^^^^^^^^^^^^^^^^^^^^^^^
118-
119-
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
120-
--> $DIR/unsupported.rs:58:1
121-
|
122-
LL | extern "msp430-interrupt" fn msp430() {}
123-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
124-
125-
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
126-
--> $DIR/unsupported.rs:68:1
127-
|
128-
LL | extern "avr-interrupt" fn avr() {}
129-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106+
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
107+
| ^^^^^^^^^^^^^^^^^^^^^^^^
130108

131-
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
132-
--> $DIR/unsupported.rs:78:1
109+
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
110+
--> $DIR/unsupported.rs:147:29
133111
|
134-
LL | extern "riscv-interrupt-m" fn riscv() {}
135-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112+
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
113+
| ^^^^^^^^^^^^^^^^^^^^^^^^
136114

137115
error[E0570]: `"C-cmse-nonsecure-entry"` is not a supported ABI for the current target
138-
--> $DIR/unsupported.rs:157:1
116+
--> $DIR/unsupported.rs:151:8
139117
|
140-
LL | extern "C-cmse-nonsecure-entry" fn cmse_entry() {}
141-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
118+
LL | extern "C-cmse-nonsecure-entry" {}
119+
| ^^^^^^^^^^^^^^^^^^^^^^^^
142120

143-
error: aborting due to 13 previous errors; 7 warnings emitted
121+
error: aborting due to 20 previous errors
144122

145123
For more information about this error, try `rustc --explain E0570`.
146-
Future incompatibility report: Future breakage diagnostic:
147-
warning: the calling convention "ptx-kernel" is not supported on this target
148-
--> $DIR/unsupported.rs:38:15
149-
|
150-
LL | fn ptx_ptr(f: extern "ptx-kernel" fn()) {
151-
| ^^^^^^^^^^^^^^^^^^^^^^^^
152-
|
153-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
154-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
155-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
156-
157-
Future breakage diagnostic:
158-
warning: the calling convention "aapcs" is not supported on this target
159-
--> $DIR/unsupported.rs:50:17
160-
|
161-
LL | fn aapcs_ptr(f: extern "aapcs" fn()) {
162-
| ^^^^^^^^^^^^^^^^^^^
163-
|
164-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
165-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
166-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
167-
168-
Future breakage diagnostic:
169-
warning: the calling convention "msp430-interrupt" is not supported on this target
170-
--> $DIR/unsupported.rs:60:18
171-
|
172-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
173-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
174-
|
175-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
176-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
177-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
178-
179-
Future breakage diagnostic:
180-
warning: the calling convention "avr-interrupt" is not supported on this target
181-
--> $DIR/unsupported.rs:70:15
182-
|
183-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
184-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
185-
|
186-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
187-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
188-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
189-
190-
Future breakage diagnostic:
191-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
192-
--> $DIR/unsupported.rs:80:17
193-
|
194-
LL | fn riscv_ptr(f: extern "riscv-interrupt-m" fn()) {
195-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
196-
|
197-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
198-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
199-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
200-
201-
Future breakage diagnostic:
202-
warning: the calling convention "C-cmse-nonsecure-call" is not supported on this target
203-
--> $DIR/unsupported.rs:151:21
204-
|
205-
LL | fn cmse_call_ptr(f: extern "C-cmse-nonsecure-call" fn()) {
206-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
207-
|
208-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
209-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
210-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
211-
212-
Future breakage diagnostic:
213-
warning: the calling convention "C-cmse-nonsecure-entry" is not supported on this target
214-
--> $DIR/unsupported.rs:159:22
215-
|
216-
LL | fn cmse_entry_ptr(f: extern "C-cmse-nonsecure-entry" fn()) {
217-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
218-
|
219-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
220-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
221-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
222-

0 commit comments

Comments
 (0)