1
1
error: `extern` block uses type `Foo`, which is not FFI-safe
2
- --> $DIR/lint-ctypes.rs:46 :28
2
+ --> $DIR/lint-ctypes.rs:47 :28
3
3
|
4
4
LL | pub fn ptr_type1(size: *const Foo);
5
5
| ^^^^^^^^^^ not FFI-safe
@@ -12,27 +12,27 @@ LL | #![deny(improper_ctypes)]
12
12
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
13
13
= note: this struct has unspecified layout
14
14
note: the type is defined here
15
- --> $DIR/lint-ctypes.rs:24 :1
15
+ --> $DIR/lint-ctypes.rs:25 :1
16
16
|
17
17
LL | pub struct Foo;
18
18
| ^^^^^^^^^^^^^^^
19
19
20
20
error: `extern` block uses type `Foo`, which is not FFI-safe
21
- --> $DIR/lint-ctypes.rs:47 :28
21
+ --> $DIR/lint-ctypes.rs:48 :28
22
22
|
23
23
LL | pub fn ptr_type2(size: *const Foo);
24
24
| ^^^^^^^^^^ not FFI-safe
25
25
|
26
26
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
27
27
= note: this struct has unspecified layout
28
28
note: the type is defined here
29
- --> $DIR/lint-ctypes.rs:24 :1
29
+ --> $DIR/lint-ctypes.rs:25 :1
30
30
|
31
31
LL | pub struct Foo;
32
32
| ^^^^^^^^^^^^^^^
33
33
34
34
error: `extern` block uses type `[u32]`, which is not FFI-safe
35
- --> $DIR/lint-ctypes.rs:48 :26
35
+ --> $DIR/lint-ctypes.rs:49 :26
36
36
|
37
37
LL | pub fn slice_type(p: &[u32]);
38
38
| ^^^^^^ not FFI-safe
@@ -41,7 +41,7 @@ LL | pub fn slice_type(p: &[u32]);
41
41
= note: slices have no C equivalent
42
42
43
43
error: `extern` block uses type `str`, which is not FFI-safe
44
- --> $DIR/lint-ctypes.rs:49 :24
44
+ --> $DIR/lint-ctypes.rs:50 :24
45
45
|
46
46
LL | pub fn str_type(p: &str);
47
47
| ^^^^ not FFI-safe
@@ -50,7 +50,7 @@ LL | pub fn str_type(p: &str);
50
50
= note: string slices have no C equivalent
51
51
52
52
error: `extern` block uses type `std::boxed::Box<u32>`, which is not FFI-safe
53
- --> $DIR/lint-ctypes.rs:50 :24
53
+ --> $DIR/lint-ctypes.rs:51 :24
54
54
|
55
55
LL | pub fn box_type(p: Box<u32>);
56
56
| ^^^^^^^^ not FFI-safe
@@ -59,7 +59,7 @@ LL | pub fn box_type(p: Box<u32>);
59
59
= note: this struct has unspecified layout
60
60
61
61
error: `extern` block uses type `std::option::Option<std::boxed::Box<u32>>`, which is not FFI-safe
62
- --> $DIR/lint-ctypes.rs:51 :28
62
+ --> $DIR/lint-ctypes.rs:52 :28
63
63
|
64
64
LL | pub fn opt_box_type(p: Option<Box<u32>>);
65
65
| ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -68,7 +68,7 @@ LL | pub fn opt_box_type(p: Option<Box<u32>>);
68
68
= note: enum has no representation hint
69
69
70
70
error: `extern` block uses type `char`, which is not FFI-safe
71
- --> $DIR/lint-ctypes.rs:53 :25
71
+ --> $DIR/lint-ctypes.rs:54 :25
72
72
|
73
73
LL | pub fn char_type(p: char);
74
74
| ^^^^ not FFI-safe
@@ -77,31 +77,31 @@ LL | pub fn char_type(p: char);
77
77
= note: the `char` type has no C equivalent
78
78
79
79
error: `extern` block uses type `i128`, which is not FFI-safe
80
- --> $DIR/lint-ctypes.rs:54 :25
80
+ --> $DIR/lint-ctypes.rs:55 :25
81
81
|
82
82
LL | pub fn i128_type(p: i128);
83
83
| ^^^^ not FFI-safe
84
84
|
85
85
= note: 128-bit integers don't currently have a known stable ABI
86
86
87
87
error: `extern` block uses type `u128`, which is not FFI-safe
88
- --> $DIR/lint-ctypes.rs:55 :25
88
+ --> $DIR/lint-ctypes.rs:56 :25
89
89
|
90
90
LL | pub fn u128_type(p: u128);
91
91
| ^^^^ not FFI-safe
92
92
|
93
93
= note: 128-bit integers don't currently have a known stable ABI
94
94
95
- error: `extern` block uses type `dyn std::clone::Clone `, which is not FFI-safe
96
- --> $DIR/lint-ctypes.rs:56 :26
95
+ error: `extern` block uses type `dyn Bar `, which is not FFI-safe
96
+ --> $DIR/lint-ctypes.rs:57 :26
97
97
|
98
- LL | pub fn trait_type(p: &dyn Clone );
99
- | ^^^^^^^^^^ not FFI-safe
98
+ LL | pub fn trait_type(p: &dyn Bar );
99
+ | ^^^^^^^^ not FFI-safe
100
100
|
101
101
= note: trait objects have no C equivalent
102
102
103
103
error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
104
- --> $DIR/lint-ctypes.rs:57 :26
104
+ --> $DIR/lint-ctypes.rs:58 :26
105
105
|
106
106
LL | pub fn tuple_type(p: (i32, i32));
107
107
| ^^^^^^^^^^ not FFI-safe
@@ -110,7 +110,7 @@ LL | pub fn tuple_type(p: (i32, i32));
110
110
= note: tuples have unspecified layout
111
111
112
112
error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
113
- --> $DIR/lint-ctypes.rs:58 :27
113
+ --> $DIR/lint-ctypes.rs:59 :27
114
114
|
115
115
LL | pub fn tuple_type2(p: I32Pair);
116
116
| ^^^^^^^ not FFI-safe
@@ -119,42 +119,42 @@ LL | pub fn tuple_type2(p: I32Pair);
119
119
= note: tuples have unspecified layout
120
120
121
121
error: `extern` block uses type `ZeroSize`, which is not FFI-safe
122
- --> $DIR/lint-ctypes.rs:59 :25
122
+ --> $DIR/lint-ctypes.rs:60 :25
123
123
|
124
124
LL | pub fn zero_size(p: ZeroSize);
125
125
| ^^^^^^^^ not FFI-safe
126
126
|
127
127
= help: consider adding a member to this struct
128
128
= note: this struct has no fields
129
129
note: the type is defined here
130
- --> $DIR/lint-ctypes.rs:20 :1
130
+ --> $DIR/lint-ctypes.rs:21 :1
131
131
|
132
132
LL | pub struct ZeroSize;
133
133
| ^^^^^^^^^^^^^^^^^^^^
134
134
135
135
error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
136
- --> $DIR/lint-ctypes.rs:60 :33
136
+ --> $DIR/lint-ctypes.rs:61 :33
137
137
|
138
138
LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
139
139
| ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
140
140
|
141
141
= note: composed only of `PhantomData`
142
142
note: the type is defined here
143
- --> $DIR/lint-ctypes.rs:43 :1
143
+ --> $DIR/lint-ctypes.rs:44 :1
144
144
|
145
145
LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
146
146
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147
147
148
148
error: `extern` block uses type `std::marker::PhantomData<bool>`, which is not FFI-safe
149
- --> $DIR/lint-ctypes.rs:63 :12
149
+ --> $DIR/lint-ctypes.rs:64 :12
150
150
|
151
151
LL | -> ::std::marker::PhantomData<bool>;
152
152
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
153
153
|
154
154
= note: composed only of `PhantomData`
155
155
156
156
error: `extern` block uses type `fn()`, which is not FFI-safe
157
- --> $DIR/lint-ctypes.rs:64 :23
157
+ --> $DIR/lint-ctypes.rs:65 :23
158
158
|
159
159
LL | pub fn fn_type(p: RustFn);
160
160
| ^^^^^^ not FFI-safe
@@ -163,7 +163,7 @@ LL | pub fn fn_type(p: RustFn);
163
163
= note: this function pointer has Rust-specific calling convention
164
164
165
165
error: `extern` block uses type `fn()`, which is not FFI-safe
166
- --> $DIR/lint-ctypes.rs:65 :24
166
+ --> $DIR/lint-ctypes.rs:66 :24
167
167
|
168
168
LL | pub fn fn_type2(p: fn());
169
169
| ^^^^ not FFI-safe
@@ -172,7 +172,7 @@ LL | pub fn fn_type2(p: fn());
172
172
= note: this function pointer has Rust-specific calling convention
173
173
174
174
error: `extern` block uses type `std::boxed::Box<u32>`, which is not FFI-safe
175
- --> $DIR/lint-ctypes.rs:66 :28
175
+ --> $DIR/lint-ctypes.rs:67 :28
176
176
|
177
177
LL | pub fn fn_contained(p: RustBadRet);
178
178
| ^^^^^^^^^^ not FFI-safe
@@ -181,15 +181,15 @@ LL | pub fn fn_contained(p: RustBadRet);
181
181
= note: this struct has unspecified layout
182
182
183
183
error: `extern` block uses type `i128`, which is not FFI-safe
184
- --> $DIR/lint-ctypes.rs:67 :32
184
+ --> $DIR/lint-ctypes.rs:68 :32
185
185
|
186
186
LL | pub fn transparent_i128(p: TransparentI128);
187
187
| ^^^^^^^^^^^^^^^ not FFI-safe
188
188
|
189
189
= note: 128-bit integers don't currently have a known stable ABI
190
190
191
191
error: `extern` block uses type `str`, which is not FFI-safe
192
- --> $DIR/lint-ctypes.rs:68 :31
192
+ --> $DIR/lint-ctypes.rs:69 :31
193
193
|
194
194
LL | pub fn transparent_str(p: TransparentStr);
195
195
| ^^^^^^^^^^^^^^ not FFI-safe
@@ -198,7 +198,7 @@ LL | pub fn transparent_str(p: TransparentStr);
198
198
= note: string slices have no C equivalent
199
199
200
200
error: `extern` block uses type `std::boxed::Box<u32>`, which is not FFI-safe
201
- --> $DIR/lint-ctypes.rs:69 :30
201
+ --> $DIR/lint-ctypes.rs:70 :30
202
202
|
203
203
LL | pub fn transparent_fn(p: TransparentBadFn);
204
204
| ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -207,7 +207,7 @@ LL | pub fn transparent_fn(p: TransparentBadFn);
207
207
= note: this struct has unspecified layout
208
208
209
209
error: `extern` block uses type `[u8; 8]`, which is not FFI-safe
210
- --> $DIR/lint-ctypes.rs:70 :27
210
+ --> $DIR/lint-ctypes.rs:71 :27
211
211
|
212
212
LL | pub fn raw_array(arr: [u8; 8]);
213
213
| ^^^^^^^ not FFI-safe
@@ -216,15 +216,15 @@ LL | pub fn raw_array(arr: [u8; 8]);
216
216
= note: passing raw arrays by value is not FFI-safe
217
217
218
218
error: `extern` block uses type `u128`, which is not FFI-safe
219
- --> $DIR/lint-ctypes.rs:72 :34
219
+ --> $DIR/lint-ctypes.rs:73 :34
220
220
|
221
221
LL | pub static static_u128_type: u128;
222
222
| ^^^^ not FFI-safe
223
223
|
224
224
= note: 128-bit integers don't currently have a known stable ABI
225
225
226
226
error: `extern` block uses type `u128`, which is not FFI-safe
227
- --> $DIR/lint-ctypes.rs:73 :40
227
+ --> $DIR/lint-ctypes.rs:74 :40
228
228
|
229
229
LL | pub static static_u128_array_type: [u128; 16];
230
230
| ^^^^^^^^^^ not FFI-safe
0 commit comments