about summary refs log tree commit diff
path: root/tests/ui/consts/const-cast-wrong-type.rs
blob: 9936a660936b059172f177df5eae47a6226e714e (plain)
1
2
3
4
5
const a: [u8; 3] = ['h' as u8, 'i' as u8, 0 as u8];
const b: *const i8 = &a as *const i8; //~ ERROR casting `&[u8; 3]` as `*const i8` is invalid

fn main() {
}