Skip to content

Commit b9e71b7

Browse files
tests: Bless cannot-be-called and dedup with unsupported ABI test
1 parent 882a136 commit b9e71b7

16 files changed

+414
-1147
lines changed
Lines changed: 37 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1,132 +1,75 @@
1-
warning: the calling convention "msp430-interrupt" is not supported on this target
2-
--> $DIR/cannot-be-called.rs:60:18
1+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
2+
--> $DIR/cannot-be-called.rs:38:8
33
|
4-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
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
4+
LL | extern "msp430-interrupt" fn msp430() {}
5+
| ^^^^^^^^^^^^^^^^^^
106

11-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
12-
--> $DIR/cannot-be-called.rs:74:19
13-
|
14-
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
8+
--> $DIR/cannot-be-called.rs:42:8
169
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
10+
LL | extern "riscv-interrupt-m" fn riscv_m() {}
11+
| ^^^^^^^^^^^^^^^^^^^
1912

20-
warning: the calling convention "riscv-interrupt-s" is not supported on this target
21-
--> $DIR/cannot-be-called.rs:81:19
22-
|
23-
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
24-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
14+
--> $DIR/cannot-be-called.rs:44:8
2515
|
26-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
16+
LL | extern "riscv-interrupt-s" fn riscv_s() {}
17+
| ^^^^^^^^^^^^^^^^^^^
2818

29-
warning: the calling convention "x86-interrupt" is not supported on this target
30-
--> $DIR/cannot-be-called.rs:88:15
19+
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
20+
--> $DIR/cannot-be-called.rs:46:8
3121
|
32-
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
33-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
34-
|
35-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
22+
LL | extern "x86-interrupt" fn x86() {}
23+
| ^^^^^^^^^^^^^^^
3724

38-
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
39-
--> $DIR/cannot-be-called.rs:36:1
25+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
26+
--> $DIR/cannot-be-called.rs:65:25
4027
|
41-
LL | extern "msp430-interrupt" fn msp430() {}
42-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28+
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
29+
| ^^^^^^^^^^^^^^^^^^
4330

44-
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
45-
--> $DIR/cannot-be-called.rs:40:1
31+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
32+
--> $DIR/cannot-be-called.rs:77:26
4633
|
47-
LL | extern "riscv-interrupt-m" fn riscv_m() {}
48-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34+
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
35+
| ^^^^^^^^^^^^^^^^^^^
4936

50-
error[E0570]: `"riscv-interrupt-s"` is not a supported ABI for the current target
51-
--> $DIR/cannot-be-called.rs:42:1
37+
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
38+
--> $DIR/cannot-be-called.rs:83:26
5239
|
53-
LL | extern "riscv-interrupt-s" fn riscv_s() {}
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
41+
| ^^^^^^^^^^^^^^^^^^^
5542

56-
error[E0570]: `"x86-interrupt"` is not a supported ABI for the current target
57-
--> $DIR/cannot-be-called.rs:44:1
43+
error[E0570]: "x86-interrupt" is not a supported ABI for the current target
44+
--> $DIR/cannot-be-called.rs:89:22
5845
|
59-
LL | extern "x86-interrupt" fn x86() {}
60-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
47+
| ^^^^^^^^^^^^^^^
6148

6249
error: functions with the "avr-interrupt" ABI cannot be called
63-
--> $DIR/cannot-be-called.rs:50:5
50+
--> $DIR/cannot-be-called.rs:53:5
6451
|
6552
LL | avr();
6653
| ^^^^^
6754
|
6855
note: an `extern "avr-interrupt"` function can only be called using inline assembly
69-
--> $DIR/cannot-be-called.rs:50:5
56+
--> $DIR/cannot-be-called.rs:53:5
7057
|
7158
LL | avr();
7259
| ^^^^^
7360

7461
error: functions with the "avr-interrupt" ABI cannot be called
75-
--> $DIR/cannot-be-called.rs:70:5
62+
--> $DIR/cannot-be-called.rs:73:5
7663
|
7764
LL | f()
7865
| ^^^
7966
|
8067
note: an `extern "avr-interrupt"` function can only be called using inline assembly
81-
--> $DIR/cannot-be-called.rs:70:5
68+
--> $DIR/cannot-be-called.rs:73:5
8269
|
8370
LL | f()
8471
| ^^^
8572

86-
error: aborting due to 6 previous errors; 4 warnings emitted
73+
error: aborting due to 10 previous errors
8774

8875
For more information about this error, try `rustc --explain E0570`.
89-
Future incompatibility report: Future breakage diagnostic:
90-
warning: the calling convention "msp430-interrupt" is not supported on this target
91-
--> $DIR/cannot-be-called.rs:60:18
92-
|
93-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
94-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95-
|
96-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
98-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
99-
100-
Future breakage diagnostic:
101-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
102-
--> $DIR/cannot-be-called.rs:74:19
103-
|
104-
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
105-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
106-
|
107-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
108-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
109-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
110-
111-
Future breakage diagnostic:
112-
warning: the calling convention "riscv-interrupt-s" is not supported on this target
113-
--> $DIR/cannot-be-called.rs:81:19
114-
|
115-
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
116-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117-
|
118-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
119-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
120-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
121-
122-
Future breakage diagnostic:
123-
warning: the calling convention "x86-interrupt" is not supported on this target
124-
--> $DIR/cannot-be-called.rs:88:15
125-
|
126-
LL | fn x86_ptr(f: extern "x86-interrupt" fn()) {
127-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
128-
|
129-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
131-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
132-
Lines changed: 35 additions & 92 deletions
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,59 @@
1-
warning: the calling convention "msp430-interrupt" is not supported on this target
2-
--> $DIR/cannot-be-called.rs:60:18
1+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
2+
--> $DIR/cannot-be-called.rs:38:8
33
|
4-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
5-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
6-
|
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
4+
LL | extern "msp430-interrupt" fn msp430() {}
5+
| ^^^^^^^^^^^^^^^^^^
106

11-
warning: the calling convention "avr-interrupt" is not supported on this target
12-
--> $DIR/cannot-be-called.rs:67:15
13-
|
14-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
15-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
7+
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
8+
--> $DIR/cannot-be-called.rs:40:8
169
|
17-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
18-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
10+
LL | extern "avr-interrupt" fn avr() {}
11+
| ^^^^^^^^^^^^^^^
1912

20-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
21-
--> $DIR/cannot-be-called.rs:74:19
22-
|
23-
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
24-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
13+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
14+
--> $DIR/cannot-be-called.rs:42:8
2515
|
26-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
27-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
16+
LL | extern "riscv-interrupt-m" fn riscv_m() {}
17+
| ^^^^^^^^^^^^^^^^^^^
2818

29-
warning: the calling convention "riscv-interrupt-s" is not supported on this target
30-
--> $DIR/cannot-be-called.rs:81:19
19+
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
20+
--> $DIR/cannot-be-called.rs:44:8
3121
|
32-
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
33-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34-
|
35-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
36-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
22+
LL | extern "riscv-interrupt-s" fn riscv_s() {}
23+
| ^^^^^^^^^^^^^^^^^^^
3724

38-
error[E0570]: `"msp430-interrupt"` is not a supported ABI for the current target
39-
--> $DIR/cannot-be-called.rs:36:1
25+
error[E0570]: "msp430-interrupt" is not a supported ABI for the current target
26+
--> $DIR/cannot-be-called.rs:65:25
4027
|
41-
LL | extern "msp430-interrupt" fn msp430() {}
42-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
28+
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
29+
| ^^^^^^^^^^^^^^^^^^
4330

44-
error[E0570]: `"avr-interrupt"` is not a supported ABI for the current target
45-
--> $DIR/cannot-be-called.rs:38:1
31+
error[E0570]: "avr-interrupt" is not a supported ABI for the current target
32+
--> $DIR/cannot-be-called.rs:71:22
4633
|
47-
LL | extern "avr-interrupt" fn avr() {}
48-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
34+
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
35+
| ^^^^^^^^^^^^^^^
4936

50-
error[E0570]: `"riscv-interrupt-m"` is not a supported ABI for the current target
51-
--> $DIR/cannot-be-called.rs:40:1
37+
error[E0570]: "riscv-interrupt-m" is not a supported ABI for the current target
38+
--> $DIR/cannot-be-called.rs:77:26
5239
|
53-
LL | extern "riscv-interrupt-m" fn riscv_m() {}
54-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
40+
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
41+
| ^^^^^^^^^^^^^^^^^^^
5542

56-
error[E0570]: `"riscv-interrupt-s"` is not a supported ABI for the current target
57-
--> $DIR/cannot-be-called.rs:42:1
43+
error[E0570]: "riscv-interrupt-s" is not a supported ABI for the current target
44+
--> $DIR/cannot-be-called.rs:83:26
5845
|
59-
LL | extern "riscv-interrupt-s" fn riscv_s() {}
60-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
46+
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
47+
| ^^^^^^^^^^^^^^^^^^^
6148

6249
error: functions with the "x86-interrupt" ABI cannot be called
63-
--> $DIR/cannot-be-called.rs:56:5
50+
--> $DIR/cannot-be-called.rs:59:5
6451
|
6552
LL | x86();
6653
| ^^^^^
6754
|
6855
note: an `extern "x86-interrupt"` function can only be called using inline assembly
69-
--> $DIR/cannot-be-called.rs:56:5
56+
--> $DIR/cannot-be-called.rs:59:5
7057
|
7158
LL | x86();
7259
| ^^^^^
@@ -83,50 +70,6 @@ note: an `extern "x86-interrupt"` function can only be called using inline assem
8370
LL | f()
8471
| ^^^
8572

86-
error: aborting due to 6 previous errors; 4 warnings emitted
73+
error: aborting due to 10 previous errors
8774

8875
For more information about this error, try `rustc --explain E0570`.
89-
Future incompatibility report: Future breakage diagnostic:
90-
warning: the calling convention "msp430-interrupt" is not supported on this target
91-
--> $DIR/cannot-be-called.rs:60:18
92-
|
93-
LL | fn msp430_ptr(f: extern "msp430-interrupt" fn()) {
94-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
95-
|
96-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
97-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
98-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
99-
100-
Future breakage diagnostic:
101-
warning: the calling convention "avr-interrupt" is not supported on this target
102-
--> $DIR/cannot-be-called.rs:67:15
103-
|
104-
LL | fn avr_ptr(f: extern "avr-interrupt" fn()) {
105-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
106-
|
107-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
108-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
109-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
110-
111-
Future breakage diagnostic:
112-
warning: the calling convention "riscv-interrupt-m" is not supported on this target
113-
--> $DIR/cannot-be-called.rs:74:19
114-
|
115-
LL | fn riscv_m_ptr(f: extern "riscv-interrupt-m" fn()) {
116-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117-
|
118-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
119-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
120-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
121-
122-
Future breakage diagnostic:
123-
warning: the calling convention "riscv-interrupt-s" is not supported on this target
124-
--> $DIR/cannot-be-called.rs:81:19
125-
|
126-
LL | fn riscv_s_ptr(f: extern "riscv-interrupt-s" fn()) {
127-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
128-
|
129-
= warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release!
130-
= note: for more information, see issue #130260 <https://github.com/rust-lang/rust/issues/130260>
131-
= note: `#[warn(unsupported_fn_ptr_calling_conventions)]` on by default
132-

0 commit comments

Comments
 (0)