mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-27 09:14:20 +00:00
13 lines
371 B
Rust
13 lines
371 B
Rust
// normalize-stderr-test "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
|
|
//! 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
|