1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// compile-flags: -O // min-llvm-version: 11.0 #![crate_type = "lib"] #[repr(C)] pub enum E { A, } // CHECK-LABEL: @index #[no_mangle] pub fn index(x: &[u32; 3], ind: E) -> u32{ // CHECK-NOT: panic_bounds_check x[ind as usize] }