rust/tests/ui/repr/align-with-extern-c-fn.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
280 B
Rust
Raw Normal View History

// run-pass
#![allow(stable_features)]
#![allow(unused_variables)]
// #45662
#![feature(repr_align)]
#[repr(align(16))]
2022-07-25 15:36:03 -05:00
pub struct A(#[allow(unused_tuple_struct_fields)] i64);
#[allow(improper_ctypes_definitions)]
pub extern "C" fn foo(x: A) {}
fn main() {
foo(A(0));
}