rust/tests/ui/simd/repr-simd-on-enum.rs
Scott McMurray 01524abb05 MIR-build: No longer emit assumes in enum-as casting
This just uses the `valid_range` from the backend, so it's duplicating the range metadata that now we include on parameters and loads.
2025-07-24 10:18:37 -07:00

16 lines
262 B
Rust

// Used to ICE; see <https://github.com/rust-lang/rust/issues/121097>
#![feature(repr_simd)]
#[repr(simd)] //~ ERROR attribute should be applied to a struct
enum Aligned {
Zero = 0,
One = 1,
}
fn tou8(al: Aligned) -> u8 {
al as u8
}
fn main() {}