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