Files
rust/tests/ui/repr/packed-struct-with-enum-53728.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

21 lines
353 B
Rust
Raw Normal View History

2025-08-20 14:02:44 -04:00
// https://github.com/rust-lang/rust/issues/53728
//@ run-pass
#![allow(dead_code)]
#[repr(u16)]
enum DeviceKind {
Nil = 0,
}
#[repr(packed)]
struct DeviceInfo {
endianness: u8,
device_kind: DeviceKind,
}
fn main() {
let _x = None::<(DeviceInfo, u8)>;
let _y = None::<(DeviceInfo, u16)>;
let _z = None::<(DeviceInfo, u64)>;
}