2024-02-16 14:02:50 -06:00
|
|
|
//@ known-bug: #110395
|
2023-04-16 06:12:37 -05:00
|
|
|
|
2023-03-04 21:10:36 -06:00
|
|
|
#![feature(const_slice_index)]
|
|
|
|
|
|
|
|
const A: [(); 5] = [(), (), (), (), ()];
|
|
|
|
|
|
|
|
// Since the indexing is on a ZST, the addresses are all fine,
|
|
|
|
// but we should still catch the bad range.
|
|
|
|
const B: &[()] = unsafe { A.get_unchecked(3..1) };
|
|
|
|
|
|
|
|
fn main() {}
|