mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-07 20:57:21 +00:00

warn less about non-exhaustive in ffi Bindgen allows generating `#[non_exhaustive] #[repr(u32)]` enums. This results in nonintuitive nonlocal `improper_ctypes` warnings, even when the types are otherwise perfectly valid in C. Adjust for actual tooling expectations by avoiding warning on simple enums with only unit variants. Closes https://github.com/rust-lang/rust/issues/116831