@@ -67,17 +67,8 @@ LL | pub fn box_type(p: Box<u32>);
67
67
= help: consider adding a `#[repr(C)]` or `#[repr(transparent)]` attribute to this struct
68
68
= note: this struct has unspecified layout
69
69
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
-
79
70
error: `extern` block uses type `char`, which is not FFI-safe
80
- --> $DIR/lint-ctypes.rs:56 :25
71
+ --> $DIR/lint-ctypes.rs:55 :25
81
72
|
82
73
LL | pub fn char_type(p: char);
83
74
| ^^^^ not FFI-safe
@@ -86,15 +77,15 @@ LL | pub fn char_type(p: char);
86
77
= note: the `char` type has no C equivalent
87
78
88
79
error: `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
90
81
|
91
82
LL | pub fn trait_type(p: &dyn Bar);
92
83
| ^^^^^^^^ not FFI-safe
93
84
|
94
85
= note: trait objects have no C equivalent
95
86
96
87
error: `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
98
89
|
99
90
LL | pub fn tuple_type(p: (i32, i32));
100
91
| ^^^^^^^^^^ not FFI-safe
@@ -103,7 +94,7 @@ LL | pub fn tuple_type(p: (i32, i32));
103
94
= note: tuples have unspecified layout
104
95
105
96
error: `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
107
98
|
108
99
LL | pub fn tuple_type2(p: I32Pair);
109
100
| ^^^^^^^ not FFI-safe
@@ -112,7 +103,7 @@ LL | pub fn tuple_type2(p: I32Pair);
112
103
= note: tuples have unspecified layout
113
104
114
105
error: `extern` block uses type `ZeroSize`, which is not FFI-safe
115
- --> $DIR/lint-ctypes.rs:60 :25
106
+ --> $DIR/lint-ctypes.rs:59 :25
116
107
|
117
108
LL | pub fn zero_size(p: ZeroSize);
118
109
| ^^^^^^^^ not FFI-safe
@@ -126,7 +117,7 @@ LL | pub struct ZeroSize;
126
117
| ^^^^^^^^^^^^^^^^^^^
127
118
128
119
error: `extern` block uses type `ZeroSizeWithPhantomData`, which is not FFI-safe
129
- --> $DIR/lint-ctypes.rs:61 :33
120
+ --> $DIR/lint-ctypes.rs:60 :33
130
121
|
131
122
LL | pub fn zero_size_phantom(p: ZeroSizeWithPhantomData);
132
123
| ^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -139,15 +130,15 @@ LL | pub struct ZeroSizeWithPhantomData(::std::marker::PhantomData<i32>);
139
130
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
131
141
132
error: `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
143
134
|
144
135
LL | -> ::std::marker::PhantomData<bool>;
145
136
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
146
137
|
147
138
= note: composed only of `PhantomData`
148
139
149
140
error: `extern` block uses type `fn()`, which is not FFI-safe
150
- --> $DIR/lint-ctypes.rs:65 :23
141
+ --> $DIR/lint-ctypes.rs:64 :23
151
142
|
152
143
LL | pub fn fn_type(p: RustFn);
153
144
| ^^^^^^ not FFI-safe
@@ -156,7 +147,7 @@ LL | pub fn fn_type(p: RustFn);
156
147
= note: this function pointer has Rust-specific calling convention
157
148
158
149
error: `extern` block uses type `fn()`, which is not FFI-safe
159
- --> $DIR/lint-ctypes.rs:66 :24
150
+ --> $DIR/lint-ctypes.rs:65 :24
160
151
|
161
152
LL | pub fn fn_type2(p: fn());
162
153
| ^^^^ not FFI-safe
@@ -165,7 +156,7 @@ LL | pub fn fn_type2(p: fn());
165
156
= note: this function pointer has Rust-specific calling convention
166
157
167
158
error: `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
169
160
|
170
161
LL | pub fn fn_contained(p: RustBadRet);
171
162
| ^^^^^^^^^^ not FFI-safe
@@ -174,7 +165,7 @@ LL | pub fn fn_contained(p: RustBadRet);
174
165
= note: this struct has unspecified layout
175
166
176
167
error: `extern` block uses type `str`, which is not FFI-safe
177
- --> $DIR/lint-ctypes.rs:68 :31
168
+ --> $DIR/lint-ctypes.rs:67 :31
178
169
|
179
170
LL | pub fn transparent_str(p: TransparentStr);
180
171
| ^^^^^^^^^^^^^^ not FFI-safe
@@ -183,7 +174,7 @@ LL | pub fn transparent_str(p: TransparentStr);
183
174
= note: string slices have no C equivalent
184
175
185
176
error: `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
187
178
|
188
179
LL | pub fn transparent_fn(p: TransparentBadFn);
189
180
| ^^^^^^^^^^^^^^^^ not FFI-safe
@@ -192,7 +183,7 @@ LL | pub fn transparent_fn(p: TransparentBadFn);
192
183
= note: this struct has unspecified layout
193
184
194
185
error: `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
196
187
|
197
188
LL | pub fn raw_array(arr: [u8; 8]);
198
189
| ^^^^^^^ not FFI-safe
@@ -201,7 +192,7 @@ LL | pub fn raw_array(arr: [u8; 8]);
201
192
= note: passing raw arrays by value is not FFI-safe
202
193
203
194
error: `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
205
196
|
206
197
LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
207
198
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
@@ -210,13 +201,13 @@ LL | pub fn no_niche_a(a: Option<UnsafeCell<extern "C" fn()>>);
210
201
= note: enum has no representation hint
211
202
212
203
error: `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
214
205
|
215
206
LL | pub fn no_niche_b(b: Option<UnsafeCell<&i32>>);
216
207
| ^^^^^^^^^^^^^^^^^^^^^^^^ not FFI-safe
217
208
|
218
209
= help: consider adding a `#[repr(C)]`, `#[repr(transparent)]`, or integer `#[repr(...)]` attribute to this enum
219
210
= note: enum has no representation hint
220
211
221
- error: aborting due to 22 previous errors
212
+ error: aborting due to 21 previous errors
222
213
0 commit comments