1 //@compile-flags: -Zmiri-permissive-provenance
2 #[derive(PartialEq, Debug)]
15 // Not using the () type here, as writes of that type do not even have MIR generated.
16 // Also not assigning directly as that's array initialization, not assignment.
17 let zst_val = [1u8; 0];
19 assert_eq!(zst_ret(), A);
20 assert_eq!(use_zst(), A);
21 let x = 42 as *mut [u8; 0];
22 // Reading and writing is ok.