11error: `extern` block uses type `Foo`, which is not FFI-safe
2- --> $DIR/lint-ctypes.rs:46 :28
2+ --> $DIR/lint-ctypes.rs:47 :28
33 |
44LL | pub fn ptr_type1(size: *const Foo);
55 | ^^^^^^^^^^ not FFI-safe
@@ -12,27 +12,27 @@ LL | #![deny(improper_ctypes)]
1212 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
1313 = note: this struct has unspecified layout
1414note: the type is defined here
15- --> $DIR/lint-ctypes.rs:24 :1
15+ --> $DIR/lint-ctypes.rs:25 :1
1616 |
1717LL | pub struct Foo;
1818 | ^^^^^^^^^^^^^^^
1919
2020error: `extern` block uses type `Foo`, which is not FFI-safe
21- --> $DIR/lint-ctypes.rs:47 :28
21+ --> $DIR/lint-ctypes.rs:48 :28
2222 |
2323LL | pub fn ptr_type2(size: *const Foo);
2424 | ^^^^^^^^^^ not FFI-safe
2525 |
2626 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
2727 = note: this struct has unspecified layout
2828note: the type is defined here
29- --> $DIR/lint-ctypes.rs:24 :1
29+ --> $DIR/lint-ctypes.rs:25 :1
3030 |
3131LL | pub struct Foo;
3232 | ^^^^^^^^^^^^^^^
3333
3434error: `extern` block uses type `[u32]`, which is not FFI-safe
35- --> $DIR/lint-ctypes.rs:48 :26
35+ --> $DIR/lint-ctypes.rs:49 :26
3636 |
3737LL | pub fn slice_type(p: &[u32]);
3838 | ^^^^^^ not FFI-safe
@@ -41,7 +41,7 @@ LL | pub fn slice_type(p: &[u32]);
4141 = note: slices have no C equivalent
4242
4343error: `extern` block uses type `str`, which is not FFI-safe
44- --> $DIR/lint-ctypes.rs:49 :24
44+ --> $DIR/lint-ctypes.rs:50 :24
4545 |
4646LL | pub fn str_type(p: &str);
4747 | ^^^^ not FFI-safe
@@ -50,7 +50,7 @@ LL | pub fn str_type(p: &str);
5050 = note: string slices have no C equivalent
5151
5252error: `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
5454 |
5555LL | pub fn box_type(p: Box<u32>);
5656 | ^^^^^^^^ not FFI-safe
@@ -59,7 +59,7 @@ LL | pub fn box_type(p: Box<u32>);
5959 = note: this struct has unspecified layout
6060
6161error: `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
6363 |
6464LL | pub fn opt_box_type(p: Option<Box<u32>>);
6565 | ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -68,7 +68,7 @@ LL | pub fn opt_box_type(p: Option<Box<u32>>);
6868 = note: enum has no representation hint
6969
7070error: `extern` block uses type `char`, which is not FFI-safe
71- --> $DIR/lint-ctypes.rs:53 :25
71+ --> $DIR/lint-ctypes.rs:54 :25
7272 |
7373LL | pub fn char_type(p: char);
7474 | ^^^^ not FFI-safe
@@ -77,31 +77,31 @@ LL | pub fn char_type(p: char);
7777 = note: the `char` type has no C equivalent
7878
7979error: `extern` block uses type `i128`, which is not FFI-safe
80- --> $DIR/lint-ctypes.rs:54 :25
80+ --> $DIR/lint-ctypes.rs:55 :25
8181 |
8282LL | pub fn i128_type(p: i128);
8383 | ^^^^ not FFI-safe
8484 |
8585 = note: 128-bit integers don't currently have a known stable ABI
8686
8787error: `extern` block uses type `u128`, which is not FFI-safe
88- --> $DIR/lint-ctypes.rs:55 :25
88+ --> $DIR/lint-ctypes.rs:56 :25
8989 |
9090LL | pub fn u128_type(p: u128);
9191 | ^^^^ not FFI-safe
9292 |
9393 = note: 128-bit integers don't currently have a known stable ABI
9494
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
9797 |
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
100100 |
101101 = note: trait objects have no C equivalent
102102
103103error: `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
105105 |
106106LL | pub fn tuple_type(p: (i32, i32));
107107 | ^^^^^^^^^^ not FFI-safe
@@ -110,7 +110,7 @@ LL | pub fn tuple_type(p: (i32, i32));
110110 = note: tuples have unspecified layout
111111
112112error: `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
114114 |
115115LL | pub fn tuple_type2(p: I32Pair);
116116 | ^^^^^^^ not FFI-safe
@@ -119,42 +119,42 @@ LL | pub fn tuple_type2(p: I32Pair);
119119 = note: tuples have unspecified layout
120120
121121error: `extern` block uses type `ZeroSize`, which is not FFI-safe
122- --> $DIR/lint-ctypes.rs:59 :25
122+ --> $DIR/lint-ctypes.rs:60 :25
123123 |
124124LL | pub fn zero_size(p: ZeroSize);
125125 | ^^^^^^^^ not FFI-safe
126126 |
127127 = help: consider adding a member to this struct
128128 = note: this struct has no fields
129129note: the type is defined here
130- --> $DIR/lint-ctypes.rs:20 :1
130+ --> $DIR/lint-ctypes.rs:21 :1
131131 |
132132LL | pub struct ZeroSize;
133133 | ^^^^^^^^^^^^^^^^^^^^
134134
135135error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
136- --> $DIR/lint-ctypes.rs:60 :33
136+ --> $DIR/lint-ctypes.rs:61 :33
137137 |
138138LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
139139 | ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
140140 |
141141 = note: composed only of `PhantomData`
142142note: the type is defined here
143- --> $DIR/lint-ctypes.rs:43 :1
143+ --> $DIR/lint-ctypes.rs:44 :1
144144 |
145145LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
146146 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
147147
148148error: `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
150150 |
151151LL | -> ::std::marker::PhantomData<bool>;
152152 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
153153 |
154154 = note: composed only of `PhantomData`
155155
156156error: `extern` block uses type `fn()`, which is not FFI-safe
157- --> $DIR/lint-ctypes.rs:64 :23
157+ --> $DIR/lint-ctypes.rs:65 :23
158158 |
159159LL | pub fn fn_type(p: RustFn);
160160 | ^^^^^^ not FFI-safe
@@ -163,7 +163,7 @@ LL | pub fn fn_type(p: RustFn);
163163 = note: this function pointer has Rust-specific calling convention
164164
165165error: `extern` block uses type `fn()`, which is not FFI-safe
166- --> $DIR/lint-ctypes.rs:65 :24
166+ --> $DIR/lint-ctypes.rs:66 :24
167167 |
168168LL | pub fn fn_type2(p: fn());
169169 | ^^^^ not FFI-safe
@@ -172,7 +172,7 @@ LL | pub fn fn_type2(p: fn());
172172 = note: this function pointer has Rust-specific calling convention
173173
174174error: `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
176176 |
177177LL | pub fn fn_contained(p: RustBadRet);
178178 | ^^^^^^^^^^ not FFI-safe
@@ -181,15 +181,15 @@ LL | pub fn fn_contained(p: RustBadRet);
181181 = note: this struct has unspecified layout
182182
183183error: `extern` block uses type `i128`, which is not FFI-safe
184- --> $DIR/lint-ctypes.rs:67 :32
184+ --> $DIR/lint-ctypes.rs:68 :32
185185 |
186186LL | pub fn transparent_i128(p: TransparentI128);
187187 | ^^^^^^^^^^^^^^^ not FFI-safe
188188 |
189189 = note: 128-bit integers don't currently have a known stable ABI
190190
191191error: `extern` block uses type `str`, which is not FFI-safe
192- --> $DIR/lint-ctypes.rs:68 :31
192+ --> $DIR/lint-ctypes.rs:69 :31
193193 |
194194LL | pub fn transparent_str(p: TransparentStr);
195195 | ^^^^^^^^^^^^^^ not FFI-safe
@@ -198,7 +198,7 @@ LL | pub fn transparent_str(p: TransparentStr);
198198 = note: string slices have no C equivalent
199199
200200error: `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
202202 |
203203LL | pub fn transparent_fn(p: TransparentBadFn);
204204 | ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -207,7 +207,7 @@ LL | pub fn transparent_fn(p: TransparentBadFn);
207207 = note: this struct has unspecified layout
208208
209209error: `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
211211 |
212212LL | pub fn raw_array(arr: [u8; 8]);
213213 | ^^^^^^^ not FFI-safe
@@ -216,15 +216,15 @@ LL | pub fn raw_array(arr: [u8; 8]);
216216 = note: passing raw arrays by value is not FFI-safe
217217
218218error: `extern` block uses type `u128`, which is not FFI-safe
219- --> $DIR/lint-ctypes.rs:72 :34
219+ --> $DIR/lint-ctypes.rs:73 :34
220220 |
221221LL | pub static static_u128_type: u128;
222222 | ^^^^ not FFI-safe
223223 |
224224 = note: 128-bit integers don't currently have a known stable ABI
225225
226226error: `extern` block uses type `u128`, which is not FFI-safe
227- --> $DIR/lint-ctypes.rs:73 :40
227+ --> $DIR/lint-ctypes.rs:74 :40
228228 |
229229LL | pub static static_u128_array_type: [u128; 16];
230230 | ^^^^^^^^^^ not FFI-safe
0 commit comments