Skip to content

Commit 4d6d564

Browse files
authored
Merge pull request rust-lang#290 from vi/patch-1
Add missing `repr(C)` to a struct exposed to C
2 parents a9f7621 + 1f90726 commit 4d6d564

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

reference/src/layout/function-pointers.md

+2
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,8 @@ bool for_all(struct Cons const *self, bool (*func)(int, void *), void *thunk);
8686
# os::raw::c_int,
8787
# };
8888
#
89+
90+
#[repr(C)]
8991
pub struct Cons {
9092
data: c_int,
9193
next: Option<Box<Cons>>,

0 commit comments

Comments
 (0)