@@ -67,17 +67,8 @@ LL | pub fn box_type(p: Box<u32>);
6767 = help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
6868 = note: this struct has unspecified layout
6969
70- error: `extern` block uses type `Option<Box<u32>>`, which is not FFI-safe
71- --> $DIR/lint-ctypes.rs:54:28
72- |
73- LL | pub fn opt_box_type(p: Option<Box<u32>>);
74- | ^^^^^^^^^^^^^^^^ not FFI-safe
75- |
76- = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
77- = note: enum has no representation hint
78-
7970error: `extern` block uses type `char`, which is not FFI-safe
80- --> $DIR/lint-ctypes.rs:56 :25
71+ --> $DIR/lint-ctypes.rs:55 :25
8172 |
8273LL | pub fn char_type(p: char);
8374 | ^^^^ not FFI-safe
@@ -86,15 +77,15 @@ LL | pub fn char_type(p: char);
8677 = note: the `char` type has no C equivalent
8778
8879error: `extern` block uses type `dyn Bar`, which is not FFI-safe
89- --> $DIR/lint-ctypes.rs:57 :26
80+ --> $DIR/lint-ctypes.rs:56 :26
9081 |
9182LL | pub fn trait_type(p: &dyn Bar);
9283 | ^^^^^^^^ not FFI-safe
9384 |
9485 = note: trait objects have no C equivalent
9586
9687error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
97- --> $DIR/lint-ctypes.rs:58 :26
88+ --> $DIR/lint-ctypes.rs:57 :26
9889 |
9990LL | pub fn tuple_type(p: (i32, i32));
10091 | ^^^^^^^^^^ not FFI-safe
@@ -103,7 +94,7 @@ LL | pub fn tuple_type(p: (i32, i32));
10394 = note: tuples have unspecified layout
10495
10596error: `extern` block uses type `(i32, i32)`, which is not FFI-safe
106- --> $DIR/lint-ctypes.rs:59 :27
97+ --> $DIR/lint-ctypes.rs:58 :27
10798 |
10899LL | pub fn tuple_type2(p: I32Pair);
109100 | ^^^^^^^ not FFI-safe
@@ -112,7 +103,7 @@ LL | pub fn tuple_type2(p: I32Pair);
112103 = note: tuples have unspecified layout
113104
114105error: `extern` block uses type `ZeroSize`, which is not FFI-safe
115- --> $DIR/lint-ctypes.rs:60 :25
106+ --> $DIR/lint-ctypes.rs:59 :25
116107 |
117108LL | pub fn zero_size(p: ZeroSize);
118109 | ^^^^^^^^ not FFI-safe
@@ -126,7 +117,7 @@ LL | pub struct ZeroSize;
126117 | ^^^^^^^^^^^^^^^^^^^
127118
128119error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
129- --> $DIR/lint-ctypes.rs:61 :33
120+ --> $DIR/lint-ctypes.rs:60 :33
130121 |
131122LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
132123 | ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -139,15 +130,15 @@ LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
139130 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140131
141132error: `extern` block uses type `PhantomData<bool>`, which is not FFI-safe
142- --> $DIR/lint-ctypes.rs:64 :12
133+ --> $DIR/lint-ctypes.rs:63 :12
143134 |
144135LL | -> ::std::marker::PhantomData<bool>;
145136 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
146137 |
147138 = note: composed only of `PhantomData`
148139
149140error: `extern` block uses type `fn()`, which is not FFI-safe
150- --> $DIR/lint-ctypes.rs:65 :23
141+ --> $DIR/lint-ctypes.rs:64 :23
151142 |
152143LL | pub fn fn_type(p: RustFn);
153144 | ^^^^^^ not FFI-safe
@@ -156,7 +147,7 @@ LL | pub fn fn_type(p: RustFn);
156147 = note: this function pointer has Rust-specific calling convention
157148
158149error: `extern` block uses type `fn()`, which is not FFI-safe
159- --> $DIR/lint-ctypes.rs:66 :24
150+ --> $DIR/lint-ctypes.rs:65 :24
160151 |
161152LL | pub fn fn_type2(p: fn());
162153 | ^^^^ not FFI-safe
@@ -165,7 +156,7 @@ LL | pub fn fn_type2(p: fn());
165156 = note: this function pointer has Rust-specific calling convention
166157
167158error: `extern` block uses type `Box<u32>`, which is not FFI-safe
168- --> $DIR/lint-ctypes.rs:67 :28
159+ --> $DIR/lint-ctypes.rs:66 :28
169160 |
170161LL | pub fn fn_contained(p: RustBadRet);
171162 | ^^^^^^^^^^ not FFI-safe
@@ -174,7 +165,7 @@ LL | pub fn fn_contained(p: RustBadRet);
174165 = note: this struct has unspecified layout
175166
176167error: `extern` block uses type `str`, which is not FFI-safe
177- --> $DIR/lint-ctypes.rs:68 :31
168+ --> $DIR/lint-ctypes.rs:67 :31
178169 |
179170LL | pub fn transparent_str(p: TransparentStr);
180171 | ^^^^^^^^^^^^^^ not FFI-safe
@@ -183,7 +174,7 @@ LL | pub fn transparent_str(p: TransparentStr);
183174 = note: string slices have no C equivalent
184175
185176error: `extern` block uses type `Box<u32>`, which is not FFI-safe
186- --> $DIR/lint-ctypes.rs:69 :30
177+ --> $DIR/lint-ctypes.rs:68 :30
187178 |
188179LL | pub fn transparent_fn(p: TransparentBadFn);
189180 | ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -192,7 +183,7 @@ LL | pub fn transparent_fn(p: TransparentBadFn);
192183 = note: this struct has unspecified layout
193184
194185error: `extern` block uses type `[u8; 8]`, which is not FFI-safe
195- --> $DIR/lint-ctypes.rs:70 :27
186+ --> $DIR/lint-ctypes.rs:69 :27
196187 |
197188LL | pub fn raw_array(arr: [u8; 8]);
198189 | ^^^^^^^ not FFI-safe
@@ -201,7 +192,7 @@ LL | pub fn raw_array(arr: [u8; 8]);
201192 = note: passing raw arrays by value is not FFI-safe
202193
203194error: `extern` block uses type `Option<UnsafeCell<extern "C" fn()>>`, which is not FFI-safe
204- --> $DIR/lint-ctypes.rs:72 :26
195+ --> $DIR/lint-ctypes.rs:71 :26
205196 |
206197LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
207198 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -210,13 +201,13 @@ LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
210201 = note: enum has no representation hint
211202
212203error: `extern` block uses type `Option<UnsafeCell<&i32>>`, which is not FFI-safe
213- --> $DIR/lint-ctypes.rs:74 :26
204+ --> $DIR/lint-ctypes.rs:73 :26
214205 |
215206LL | pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
216207 | ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
217208 |
218209 = help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
219210 = note: enum has no representation hint
220211
221- error: aborting due to 22 previous errors
212+ error: aborting due to 21 previous errors
222213
0 commit comments