blob: ebc5543b380a542ceeb8b30071962661fb83ded4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
|
// known-bug: #110395
#![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() {}
|