Files
rust/tests/ui/attributes/malformed-reprs.rs
Jonathan Brouwer f7046bd32a Regression tests for repr ICEs
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
2025-07-06 22:07:09 +02:00

15 lines
507 B
Rust

// Tests a few different invalid repr attributes
// This is a regression test for https://github.com/rust-lang/rust/issues/143522
#![repr]
//~^ ERROR malformed `repr` attribute input [E0539]
//~| ERROR `repr` attribute cannot be used at crate level
// This is a regression test for https://github.com/rust-lang/rust/issues/143479
#[repr(align(0))]
//~^ ERROR invalid `repr(align)` attribute: not a power of two
//~| ERROR unsupported representation for zero-variant enum [E0084]
enum Foo {}
fn main() {}