mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-28 19:27:30 +03:00
7025605b8c
Moreover, dereference `ty_layout.align` for `#[rustc_dump_layout(align)]`
to render `align: Align($N bytes)` instead of `align: AbiAlign { abi: Align($N bytes) }`
which contains the same amount of information but it more concise and legible.
13 lines
411 B
Rust
13 lines
411 B
Rust
//@ normalize-stderr: "pref: Align\([1-8] bytes\)" -> "pref: $$PREF_ALIGN"
|
|
//! Various struct layout tests.
|
|
|
|
#![feature(rustc_attrs)]
|
|
#![feature(never_type)]
|
|
#![crate_type = "lib"]
|
|
|
|
#[rustc_dump_layout(backend_repr)]
|
|
struct AlignedZstPreventsScalar(i16, [i32; 0]); //~ERROR: backend_repr: Memory
|
|
|
|
#[rustc_dump_layout(backend_repr)]
|
|
struct AlignedZstButStillScalar(i32, [i16; 0]); //~ERROR: backend_repr: Scalar
|