1
1
error: `extern` fn uses type `[u32]`, which is not FFI-safe
2
- --> $DIR/lint-ctypes-fn.rs:69 :33
2
+ --> $DIR/lint-ctypes-fn.rs:73 :33
3
3
|
4
4
LL | pub extern "C" fn slice_type(p: &[u32]) { }
5
5
| ^^^^^^ not FFI-safe
@@ -13,7 +13,7 @@ LL | #![deny(improper_ctypes_definitions)]
13
13
= note: slices have no C equivalent
14
14
15
15
error: `extern` fn uses type `str`, which is not FFI-safe
16
- --> $DIR/lint-ctypes-fn.rs:72 :31
16
+ --> $DIR/lint-ctypes-fn.rs:76 :31
17
17
|
18
18
LL | pub extern "C" fn str_type(p: &str) { }
19
19
| ^^^^ not FFI-safe
@@ -22,31 +22,31 @@ LL | pub extern "C" fn str_type(p: &str) { }
22
22
= note: string slices have no C equivalent
23
23
24
24
error: `extern` fn uses type `Box<[u8]>`, which is not FFI-safe
25
- --> $DIR/lint-ctypes-fn.rs:79 :34
25
+ --> $DIR/lint-ctypes-fn.rs:83 :34
26
26
|
27
27
LL | pub extern "C" fn boxed_slice(p: Box<[u8]>) { }
28
28
| ^^^^^^^^^ not FFI-safe
29
29
|
30
30
= note: box cannot be represented as a single pointer
31
31
32
32
error: `extern` fn uses type `Box<str>`, which is not FFI-safe
33
- --> $DIR/lint-ctypes-fn.rs:82 :35
33
+ --> $DIR/lint-ctypes-fn.rs:86 :35
34
34
|
35
35
LL | pub extern "C" fn boxed_string(p: Box<str>) { }
36
36
| ^^^^^^^^ not FFI-safe
37
37
|
38
38
= note: box cannot be represented as a single pointer
39
39
40
40
error: `extern` fn uses type `Box<dyn Trait>`, which is not FFI-safe
41
- --> $DIR/lint-ctypes-fn.rs:85 :34
41
+ --> $DIR/lint-ctypes-fn.rs:89 :34
42
42
|
43
43
LL | pub extern "C" fn boxed_trait(p: Box<dyn Trait>) { }
44
44
| ^^^^^^^^^^^^^^ not FFI-safe
45
45
|
46
46
= note: box cannot be represented as a single pointer
47
47
48
48
error: `extern` fn uses type `char`, which is not FFI-safe
49
- --> $DIR/lint-ctypes-fn.rs:88 :32
49
+ --> $DIR/lint-ctypes-fn.rs:92 :32
50
50
|
51
51
LL | pub extern "C" fn char_type(p: char) { }
52
52
| ^^^^ not FFI-safe
@@ -55,23 +55,23 @@ LL | pub extern "C" fn char_type(p: char) { }
55
55
= note: the `char` type has no C equivalent
56
56
57
57
error: `extern` fn uses type `i128`, which is not FFI-safe
58
- --> $DIR/lint-ctypes-fn.rs:91 :32
58
+ --> $DIR/lint-ctypes-fn.rs:95 :32
59
59
|
60
60
LL | pub extern "C" fn i128_type(p: i128) { }
61
61
| ^^^^ not FFI-safe
62
62
|
63
63
= note: 128-bit integers don't currently have a known stable ABI
64
64
65
65
error: `extern` fn uses type `u128`, which is not FFI-safe
66
- --> $DIR/lint-ctypes-fn.rs:94 :32
66
+ --> $DIR/lint-ctypes-fn.rs:98 :32
67
67
|
68
68
LL | pub extern "C" fn u128_type(p: u128) { }
69
69
| ^^^^ not FFI-safe
70
70
|
71
71
= note: 128-bit integers don't currently have a known stable ABI
72
72
73
73
error: `extern` fn uses type `(i32, i32)`, which is not FFI-safe
74
- --> $DIR/lint-ctypes-fn.rs:97 :33
74
+ --> $DIR/lint-ctypes-fn.rs:101 :33
75
75
|
76
76
LL | pub extern "C" fn tuple_type(p: (i32, i32)) { }
77
77
| ^^^^^^^^^^ not FFI-safe
@@ -80,7 +80,7 @@ LL | pub extern "C" fn tuple_type(p: (i32, i32)) { }
80
80
= note: tuples have unspecified layout
81
81
82
82
error: `extern` fn uses type `(i32, i32)`, which is not FFI-safe
83
- --> $DIR/lint-ctypes-fn.rs:100 :34
83
+ --> $DIR/lint-ctypes-fn.rs:104 :34
84
84
|
85
85
LL | pub extern "C" fn tuple_type2(p: I32Pair) { }
86
86
| ^^^^^^^ not FFI-safe
@@ -89,7 +89,7 @@ LL | pub extern "C" fn tuple_type2(p: I32Pair) { }
89
89
= note: tuples have unspecified layout
90
90
91
91
error: `extern` fn uses type `ZeroSize`, which is not FFI-safe
92
- --> $DIR/lint-ctypes-fn.rs:103 :32
92
+ --> $DIR/lint-ctypes-fn.rs:107 :32
93
93
|
94
94
LL | pub extern "C" fn zero_size(p: ZeroSize) { }
95
95
| ^^^^^^^^ not FFI-safe
@@ -103,7 +103,7 @@ LL | pub struct ZeroSize;
103
103
| ^^^^^^^^^^^^^^^^^^^^
104
104
105
105
error: `extern` fn uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
106
- --> $DIR/lint-ctypes-fn.rs:106 :40
106
+ --> $DIR/lint-ctypes-fn.rs:110 :40
107
107
|
108
108
LL | pub extern "C" fn zero_size_phantom(p: ZeroSizeWithPhantomData) { }
109
109
| ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -116,15 +116,15 @@ LL | pub struct ZeroSizeWithPhantomData(PhantomData<i32>);
116
116
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
117
117
118
118
error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
119
- --> $DIR/lint-ctypes-fn.rs:109 :51
119
+ --> $DIR/lint-ctypes-fn.rs:113 :51
120
120
|
121
121
LL | pub extern "C" fn zero_size_phantom_toplevel() -> PhantomData<bool> {
122
122
| ^^^^^^^^^^^^^^^^^ not FFI-safe
123
123
|
124
124
= note: composed only of `PhantomData`
125
125
126
126
error: `extern` fn uses type `fn()`, which is not FFI-safe
127
- --> $DIR/lint-ctypes-fn.rs:114 :30
127
+ --> $DIR/lint-ctypes-fn.rs:118 :30
128
128
|
129
129
LL | pub extern "C" fn fn_type(p: RustFn) { }
130
130
| ^^^^^^ not FFI-safe
@@ -133,7 +133,7 @@ LL | pub extern "C" fn fn_type(p: RustFn) { }
133
133
= note: this function pointer has Rust-specific calling convention
134
134
135
135
error: `extern` fn uses type `fn()`, which is not FFI-safe
136
- --> $DIR/lint-ctypes-fn.rs:117 :31
136
+ --> $DIR/lint-ctypes-fn.rs:121 :31
137
137
|
138
138
LL | pub extern "C" fn fn_type2(p: fn()) { }
139
139
| ^^^^ not FFI-safe
@@ -142,15 +142,15 @@ LL | pub extern "C" fn fn_type2(p: fn()) { }
142
142
= note: this function pointer has Rust-specific calling convention
143
143
144
144
error: `extern` fn uses type `i128`, which is not FFI-safe
145
- --> $DIR/lint-ctypes-fn.rs:122 :39
145
+ --> $DIR/lint-ctypes-fn.rs:126 :39
146
146
|
147
147
LL | pub extern "C" fn transparent_i128(p: TransparentI128) { }
148
148
| ^^^^^^^^^^^^^^^ not FFI-safe
149
149
|
150
150
= note: 128-bit integers don't currently have a known stable ABI
151
151
152
152
error: `extern` fn uses type `str`, which is not FFI-safe
153
- --> $DIR/lint-ctypes-fn.rs:125 :38
153
+ --> $DIR/lint-ctypes-fn.rs:129 :38
154
154
|
155
155
LL | pub extern "C" fn transparent_str(p: TransparentStr) { }
156
156
| ^^^^^^^^^^^^^^ not FFI-safe
@@ -159,15 +159,15 @@ LL | pub extern "C" fn transparent_str(p: TransparentStr) { }
159
159
= note: string slices have no C equivalent
160
160
161
161
error: `extern` fn uses type `PhantomData<bool>`, which is not FFI-safe
162
- --> $DIR/lint-ctypes-fn.rs:171 :43
162
+ --> $DIR/lint-ctypes-fn.rs:175 :43
163
163
|
164
164
LL | pub extern "C" fn unused_generic2<T>() -> PhantomData<bool> {
165
165
| ^^^^^^^^^^^^^^^^^ not FFI-safe
166
166
|
167
167
= note: composed only of `PhantomData`
168
168
169
169
error: `extern` fn uses type `Vec<T>`, which is not FFI-safe
170
- --> $DIR/lint-ctypes-fn.rs:184 :39
170
+ --> $DIR/lint-ctypes-fn.rs:188 :39
171
171
|
172
172
LL | pub extern "C" fn used_generic4<T>(x: Vec<T>) { }
173
173
| ^^^^^^ not FFI-safe
@@ -176,7 +176,7 @@ LL | pub extern "C" fn used_generic4<T>(x: Vec<T>) { }
176
176
= note: this struct has unspecified layout
177
177
178
178
error: `extern` fn uses type `Vec<T>`, which is not FFI-safe
179
- --> $DIR/lint-ctypes-fn.rs:187 :41
179
+ --> $DIR/lint-ctypes-fn.rs:191 :41
180
180
|
181
181
LL | pub extern "C" fn used_generic5<T>() -> Vec<T> {
182
182
| ^^^^^^ not FFI-safe
0 commit comments