Skip to content

Commit f1e7424

Browse files
tests: Dedup unsupported ABI and cannot-be-called test
1 parent b6d9ace commit f1e7424

16 files changed

+413
-745
lines changed
Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,99 @@
11
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
2-
--> $DIR/cannot-be-called.rs:36:8
2+
--> $DIR/cannot-be-called.rs:43:8
33
|
44
LL | extern "msp430-interrupt" fn msp430() {}
55
| ^^^^^^^^^^^^^^^^^^
66

77
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
8-
--> $DIR/cannot-be-called.rs:40:8
8+
--> $DIR/cannot-be-called.rs:47:8
99
|
1010
LL | extern "riscv-interrupt-m" fn riscv_m() {}
1111
| ^^^^^^^^^^^^^^^^^^^
1212

1313
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
14-
--> $DIR/cannot-be-called.rs:42:8
14+
--> $DIR/cannot-be-called.rs:49:8
1515
|
1616
LL | extern "riscv-interrupt-s" fn riscv_s() {}
1717
| ^^^^^^^^^^^^^^^^^^^
1818

1919
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
20-
--> $DIR/cannot-be-called.rs:44:8
20+
--> $DIR/cannot-be-called.rs:51:8
2121
|
2222
LL | extern "x86-interrupt" fn x86() {}
2323
| ^^^^^^^^^^^^^^^
2424

2525
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
26-
--> $DIR/cannot-be-called.rs:60:25
26+
--> $DIR/cannot-be-called.rs:56:8
27+
|
28+
LL | extern "msp430-interrupt" {}
29+
| ^^^^^^^^^^^^^^^^^^
30+
31+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
32+
--> $DIR/cannot-be-called.rs:60:8
33+
|
34+
LL | extern "riscv-interrupt-m" {}
35+
| ^^^^^^^^^^^^^^^^^^^
36+
37+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
38+
--> $DIR/cannot-be-called.rs:62:8
39+
|
40+
LL | extern "riscv-interrupt-m" {}
41+
| ^^^^^^^^^^^^^^^^^^^
42+
43+
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
44+
--> $DIR/cannot-be-called.rs:64:8
45+
|
46+
LL | extern "x86-interrupt" {}
47+
| ^^^^^^^^^^^^^^^
48+
49+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
50+
--> $DIR/cannot-be-called.rs:84:25
2751
|
2852
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
2953
| ^^^^^^^^^^^^^^^^^^
3054

3155
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
32-
--> $DIR/cannot-be-called.rs:72:26
56+
--> $DIR/cannot-be-called.rs:96:26
3357
|
3458
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
3559
| ^^^^^^^^^^^^^^^^^^^
3660

3761
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
38-
--> $DIR/cannot-be-called.rs:78:26
62+
--> $DIR/cannot-be-called.rs:102:26
3963
|
4064
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
4165
| ^^^^^^^^^^^^^^^^^^^
4266

4367
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
44-
--> $DIR/cannot-be-called.rs:84:22
68+
--> $DIR/cannot-be-called.rs:108:22
4569
|
4670
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
4771
| ^^^^^^^^^^^^^^^
4872

4973
error: functions with the "avr-interrupt" ABI cannot be called
50-
--> $DIR/cannot-be-called.rs:50:5
74+
--> $DIR/cannot-be-called.rs:72:5
5175
|
5276
LL | avr();
5377
| ^^^^^
5478
|
5579
note: an `extern "avr-interrupt"` function can only be called using inline assembly
56-
--> $DIR/cannot-be-called.rs:50:5
80+
--> $DIR/cannot-be-called.rs:72:5
5781
|
5882
LL | avr();
5983
| ^^^^^
6084

6185
error: functions with the "avr-interrupt" ABI cannot be called
62-
--> $DIR/cannot-be-called.rs:68:5
86+
--> $DIR/cannot-be-called.rs:92:5
6387
|
6488
LL | f()
6589
| ^^^
6690
|
6791
note: an `extern "avr-interrupt"` function can only be called using inline assembly
68-
--> $DIR/cannot-be-called.rs:68:5
92+
--> $DIR/cannot-be-called.rs:92:5
6993
|
7094
LL | f()
7195
| ^^^
7296

73-
error: aborting due to 10 previous errors
97+
error: aborting due to 14 previous errors
7498

7599
For more information about this error, try `rustc --explain E0570`.
Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,99 @@
11
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
2-
--> $DIR/cannot-be-called.rs:36:8
2+
--> $DIR/cannot-be-called.rs:43:8
33
|
44
LL | extern "msp430-interrupt" fn msp430() {}
55
| ^^^^^^^^^^^^^^^^^^
66

77
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
8-
--> $DIR/cannot-be-called.rs:38:8
8+
--> $DIR/cannot-be-called.rs:45:8
99
|
1010
LL | extern "avr-interrupt" fn avr() {}
1111
| ^^^^^^^^^^^^^^^
1212

1313
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
14-
--> $DIR/cannot-be-called.rs:40:8
14+
--> $DIR/cannot-be-called.rs:47:8
1515
|
1616
LL | extern "riscv-interrupt-m" fn riscv_m() {}
1717
| ^^^^^^^^^^^^^^^^^^^
1818

1919
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
20-
--> $DIR/cannot-be-called.rs:42:8
20+
--> $DIR/cannot-be-called.rs:49:8
2121
|
2222
LL | extern "riscv-interrupt-s" fn riscv_s() {}
2323
| ^^^^^^^^^^^^^^^^^^^
2424

2525
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
26-
--> $DIR/cannot-be-called.rs:60:25
26+
--> $DIR/cannot-be-called.rs:56:8
27+
|
28+
LL | extern "msp430-interrupt" {}
29+
| ^^^^^^^^^^^^^^^^^^
30+
31+
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
32+
--> $DIR/cannot-be-called.rs:58:8
33+
|
34+
LL | extern "avr-interrupt" {}
35+
| ^^^^^^^^^^^^^^^
36+
37+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
38+
--> $DIR/cannot-be-called.rs:60:8
39+
|
40+
LL | extern "riscv-interrupt-m" {}
41+
| ^^^^^^^^^^^^^^^^^^^
42+
43+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
44+
--> $DIR/cannot-be-called.rs:62:8
45+
|
46+
LL | extern "riscv-interrupt-m" {}
47+
| ^^^^^^^^^^^^^^^^^^^
48+
49+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
50+
--> $DIR/cannot-be-called.rs:84:25
2751
|
2852
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
2953
| ^^^^^^^^^^^^^^^^^^
3054

3155
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
32-
--> $DIR/cannot-be-called.rs:66:22
56+
--> $DIR/cannot-be-called.rs:90:22
3357
|
3458
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
3559
| ^^^^^^^^^^^^^^^
3660

3761
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
38-
--> $DIR/cannot-be-called.rs:72:26
62+
--> $DIR/cannot-be-called.rs:96:26
3963
|
4064
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
4165
| ^^^^^^^^^^^^^^^^^^^
4266

4367
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
44-
--> $DIR/cannot-be-called.rs:78:26
68+
--> $DIR/cannot-be-called.rs:102:26
4569
|
4670
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
4771
| ^^^^^^^^^^^^^^^^^^^
4872

4973
error: functions with the "x86-interrupt" ABI cannot be called
50-
--> $DIR/cannot-be-called.rs:56:5
74+
--> $DIR/cannot-be-called.rs:78:5
5175
|
5276
LL | x86();
5377
| ^^^^^
5478
|
5579
note: an `extern "x86-interrupt"` function can only be called using inline assembly
56-
--> $DIR/cannot-be-called.rs:56:5
80+
--> $DIR/cannot-be-called.rs:78:5
5781
|
5882
LL | x86();
5983
| ^^^^^
6084

6185
error: functions with the "x86-interrupt" ABI cannot be called
62-
--> $DIR/cannot-be-called.rs:86:5
86+
--> $DIR/cannot-be-called.rs:110:5
6387
|
6488
LL | f()
6589
| ^^^
6690
|
6791
note: an `extern "x86-interrupt"` function can only be called using inline assembly
68-
--> $DIR/cannot-be-called.rs:86:5
92+
--> $DIR/cannot-be-called.rs:110:5
6993
|
7094
LL | f()
7195
| ^^^
7296

73-
error: aborting due to 10 previous errors
97+
error: aborting due to 14 previous errors
7498

7599
For more information about this error, try `rustc --explain E0570`.
Lines changed: 37 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,75 +1,99 @@
11
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
2-
--> $DIR/cannot-be-called.rs:38:8
2+
--> $DIR/cannot-be-called.rs:45:8
33
|
44
LL | extern "avr-interrupt" fn avr() {}
55
| ^^^^^^^^^^^^^^^
66

77
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
8-
--> $DIR/cannot-be-called.rs:40:8
8+
--> $DIR/cannot-be-called.rs:47:8
99
|
1010
LL | extern "riscv-interrupt-m" fn riscv_m() {}
1111
| ^^^^^^^^^^^^^^^^^^^
1212

1313
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
14-
--> $DIR/cannot-be-called.rs:42:8
14+
--> $DIR/cannot-be-called.rs:49:8
1515
|
1616
LL | extern "riscv-interrupt-s" fn riscv_s() {}
1717
| ^^^^^^^^^^^^^^^^^^^
1818

1919
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
20-
--> $DIR/cannot-be-called.rs:44:8
20+
--> $DIR/cannot-be-called.rs:51:8
2121
|
2222
LL | extern "x86-interrupt" fn x86() {}
2323
| ^^^^^^^^^^^^^^^
2424

2525
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
26-
--> $DIR/cannot-be-called.rs:66:22
26+
--> $DIR/cannot-be-called.rs:58:8
27+
|
28+
LL | extern "avr-interrupt" {}
29+
| ^^^^^^^^^^^^^^^
30+
31+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
32+
--> $DIR/cannot-be-called.rs:60:8
33+
|
34+
LL | extern "riscv-interrupt-m" {}
35+
| ^^^^^^^^^^^^^^^^^^^
36+
37+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
38+
--> $DIR/cannot-be-called.rs:62:8
39+
|
40+
LL | extern "riscv-interrupt-m" {}
41+
| ^^^^^^^^^^^^^^^^^^^
42+
43+
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
44+
--> $DIR/cannot-be-called.rs:64:8
45+
|
46+
LL | extern "x86-interrupt" {}
47+
| ^^^^^^^^^^^^^^^
48+
49+
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
50+
--> $DIR/cannot-be-called.rs:90:22
2751
|
2852
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
2953
| ^^^^^^^^^^^^^^^
3054

3155
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
32-
--> $DIR/cannot-be-called.rs:72:26
56+
--> $DIR/cannot-be-called.rs:96:26
3357
|
3458
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
3559
| ^^^^^^^^^^^^^^^^^^^
3660

3761
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
38-
--> $DIR/cannot-be-called.rs:78:26
62+
--> $DIR/cannot-be-called.rs:102:26
3963
|
4064
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
4165
| ^^^^^^^^^^^^^^^^^^^
4266

4367
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
44-
--> $DIR/cannot-be-called.rs:84:22
68+
--> $DIR/cannot-be-called.rs:108:22
4569
|
4670
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
4771
| ^^^^^^^^^^^^^^^
4872

4973
error: functions with the "msp430-interrupt" ABI cannot be called
50-
--> $DIR/cannot-be-called.rs:48:5
74+
--> $DIR/cannot-be-called.rs:70:5
5175
|
5276
LL | msp430();
5377
| ^^^^^^^^
5478
|
5579
note: an `extern "msp430-interrupt"` function can only be called using inline assembly
56-
--> $DIR/cannot-be-called.rs:48:5
80+
--> $DIR/cannot-be-called.rs:70:5
5781
|
5882
LL | msp430();
5983
| ^^^^^^^^
6084

6185
error: functions with the "msp430-interrupt" ABI cannot be called
62-
--> $DIR/cannot-be-called.rs:62:5
86+
--> $DIR/cannot-be-called.rs:86:5
6387
|
6488
LL | f()
6589
| ^^^
6690
|
6791
note: an `extern "msp430-interrupt"` function can only be called using inline assembly
68-
--> $DIR/cannot-be-called.rs:62:5
92+
--> $DIR/cannot-be-called.rs:86:5
6993
|
7094
LL | f()
7195
| ^^^
7296

73-
error: aborting due to 10 previous errors
97+
error: aborting due to 14 previous errors
7498

7599
For more information about this error, try `rustc --explain E0570`.

0 commit comments

Comments
 (0)