Closed
Description
The following should be stopped by the const sanity check:
#![feature(never_type, const_transmute)]
use std::mem;
const TEST: [!; 1] = unsafe { mem::transmute(()) };
But it is not.
The issue is that the sanity check calls is_zst()
to skip arrays that could be immediate, but some of those arrays are uninhabited...
Cc @oli-obk
Metadata
Metadata
Assignees
Labels
No labels