@@ -29,15 +29,15 @@ LL + pub type T1 = extern "C" fn();
29
29
error: an `fn` pointer type cannot be `const`
30
30
--> $DIR/bad-fn-ptr-qualifier.rs:7:15
31
31
|
32
- LL | pub type T2 = const unsafe extern fn();
33
- | -----^^^^^^^^^^^^^^^^^^^
32
+ LL | pub type T2 = const unsafe extern "C" fn();
33
+ | -----^^^^^^^^^^^^^^^^^^^^^^^
34
34
| |
35
35
| `const` because of this
36
36
|
37
37
help: remove the `const` qualifier
38
38
|
39
- LL - pub type T2 = const unsafe extern fn();
40
- LL + pub type T2 = unsafe extern fn();
39
+ LL - pub type T2 = const unsafe extern "C" fn();
40
+ LL + pub type T2 = unsafe extern "C" fn();
41
41
|
42
42
43
43
error: an `fn` pointer type cannot be `async`
@@ -57,15 +57,15 @@ LL + pub type T3 = fn();
57
57
error: an `fn` pointer type cannot be `async`
58
58
--> $DIR/bad-fn-ptr-qualifier.rs:9:15
59
59
|
60
- LL | pub type T4 = async extern fn();
61
- | -----^^^^^^^^^^^^
60
+ LL | pub type T4 = async extern "C" fn();
61
+ | -----^^^^^^^^^^^^^^^^
62
62
| |
63
63
| `async` because of this
64
64
|
65
65
help: remove the `async` qualifier
66
66
|
67
- LL - pub type T4 = async extern fn();
68
- LL + pub type T4 = extern fn();
67
+ LL - pub type T4 = async extern "C" fn();
68
+ LL + pub type T4 = extern "C" fn();
69
69
|
70
70
71
71
error: an `fn` pointer type cannot be `async`
@@ -141,15 +141,15 @@ LL + pub type FTT1 = for<'a> extern "C" fn();
141
141
error: an `fn` pointer type cannot be `const`
142
142
--> $DIR/bad-fn-ptr-qualifier.rs:17:17
143
143
|
144
- LL | pub type FTT2 = for<'a> const unsafe extern fn();
145
- | ^^^^^^^^-----^^^^^^^^^^^^^^^^^^^
144
+ LL | pub type FTT2 = for<'a> const unsafe extern "C" fn();
145
+ | ^^^^^^^^-----^^^^^^^^^^^^^^^^^^^^^^^
146
146
| |
147
147
| `const` because of this
148
148
|
149
149
help: remove the `const` qualifier
150
150
|
151
- LL - pub type FTT2 = for<'a> const unsafe extern fn();
152
- LL + pub type FTT2 = for<'a> unsafe extern fn();
151
+ LL - pub type FTT2 = for<'a> const unsafe extern "C" fn();
152
+ LL + pub type FTT2 = for<'a> unsafe extern "C" fn();
153
153
|
154
154
155
155
error: an `fn` pointer type cannot be `async`
@@ -169,15 +169,15 @@ LL + pub type FTT3 = for<'a> fn();
169
169
error: an `fn` pointer type cannot be `async`
170
170
--> $DIR/bad-fn-ptr-qualifier.rs:19:17
171
171
|
172
- LL | pub type FTT4 = for<'a> async extern fn();
173
- | ^^^^^^^^-----^^^^^^^^^^^^
172
+ LL | pub type FTT4 = for<'a> async extern "C" fn();
173
+ | ^^^^^^^^-----^^^^^^^^^^^^^^^^
174
174
| |
175
175
| `async` because of this
176
176
|
177
177
help: remove the `async` qualifier
178
178
|
179
- LL - pub type FTT4 = for<'a> async extern fn();
180
- LL + pub type FTT4 = for<'a> extern fn();
179
+ LL - pub type FTT4 = for<'a> async extern "C" fn();
180
+ LL + pub type FTT4 = for<'a> extern "C" fn();
181
181
|
182
182
183
183
error: an `fn` pointer type cannot be `async`
0 commit comments