(o: &T)
| 9 | */ |
| 10 | fn main() { |
| 11 | fn as_bytes<T>(o: &T) -> &[u8] { |
| 12 | unsafe { |
| 13 | std::slice::from_raw_parts( |
| 14 | o as *const _ as *const u8, |
| 15 | std::mem::size_of::<T>()) |
| 16 | } |
| 17 | } |
| 18 | println!("{:?}", as_bytes(&1i8)); |
| 19 | println!("{:?}", as_bytes(&2i16)); |
| 20 | println!("{:?}", as_bytes(&3i32)); |
nothing calls this directly
no outgoing calls
no test coverage detected