File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -142,11 +142,14 @@ struct CLayout {
142
142
// ...
143
143
}
144
144
145
+
145
146
extern {
146
147
fn foo (x : UnspecifiedLayout ); // warning: use of non-FFI-safe struct in extern declaration
147
148
148
149
fn bar (x : CLayout ); // no warning
149
150
}
151
+
152
+ extern " C" fn foo (x : UnspecifiedLayout ) { } // warning: use of non-FFI-safe struct in function with C abi.
150
153
```
151
154
152
155
@@ -166,6 +169,3 @@ extern {
166
169
end of a struct? (Just always lay-out unsized fields last?
167
170
(i.e. after monomorphisation if a field was originally marked
168
171
` Sized? ` then it needs to be last).)
169
- - Should the lint apply to C-compatible functions defined in Rust like
170
- ` extern "C" fn foo(x: UnspecifiedLayout) ` ? (The equivalent lint for
171
- enums does not pick up this case.)
You can’t perform that action at this time.
0 commit comments