]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-3656.rs
Rollup merge of #62663 - llogiq:more-questionmark-docs, r=GuillaumeGomez
[rust.git] / src / test / ui / issues / issue-3656.rs
1 // run-pass
2 #![allow(dead_code)]
3 #![allow(improper_ctypes)]
4
5 // Issue #3656
6 // Incorrect struct size computation in the FFI, because of not taking
7 // the alignment of elements into account.
8
9 // pretty-expanded FIXME #23616
10 // ignore-wasm32-bare no libc to test with
11
12 #![feature(rustc_private)]
13
14 extern crate libc;
15 use libc::{c_uint, uint32_t, c_void};
16
17 pub struct KEYGEN {
18     hash_algorithm: [c_uint; 2],
19     count: uint32_t,
20     salt: *const c_void,
21     salt_size: uint32_t,
22 }
23
24 extern {
25     // Bogus signature, just need to test if it compiles.
26     pub fn malloc(data: KEYGEN);
27 }
28
29 pub fn main() {
30 }