about summary refs log tree commit diff
path: root/tests/ui/layout/struct.rs
blob: 5f652b3d570db72cc78bbc1e73910e76bc00773c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
//@ normalize-stderr: "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: Memory

#[rustc_layout(abi)]
struct AlignedZstButStillScalar(i32, [i16; 0]); //~ERROR: abi: Scalar