#![allow(dead_code, deprecated, unused_variables, unused_mut)] #![feature(f16)] fn main() { #[cfg(all(target_arch = "x86_64", target_os = "linux"))] { let bytes = 12.5f16.to_ne_bytes(); assert_eq!( bytes, if cfg!(target_endian = "big") { [0x4a, 0x40] } else { [0x40, 0x4a] } ); } }