2024-02-16 14:02:50 -06:00
|
|
|
//@ normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
|
2023-08-27 11:01:05 -05:00
|
|
|
//! Various struct layout tests.
|
|
|
|
|
|
|
|
#![feature(rustc_attrs)]
|
|
|
|
#![feature(never_type)]
|
|
|
|
#![crate_type = "lib"]
|
|
|
|
|
|
|
|
#[rustc_layout(abi)]
|
|
|
|
struct AlignedZstPreventsScalar(i16, [i32; 0]); //~ERROR: abi: Aggregate
|
|
|
|
|
|
|
|
#[rustc_layout(abi)]
|
|
|
|
struct AlignedZstButStillScalar(i32, [i16; 0]); //~ERROR: abi: Scalar
|