remove const_slice_index annotations, it never had a feature gate anyway

This commit is contained in:
Ralf Jung 2024-09-08 08:54:01 +02:00
parent 332fa6aa6e
commit 7a3a317618
6 changed files with 1 additions and 21 deletions

View file

@ -1,7 +1,5 @@
//@ known-bug: #110395
#![feature(const_slice_index)]
const A: [(); 5] = [(), (), (), (), ()];
// Since the indexing is on a ZST, the addresses are all fine,

View file

@ -1,5 +1,5 @@
error[E0015]: cannot call non-const fn `core::slice::<impl [()]>::get_unchecked::<std::ops::Range<usize>>` in constants
--> $DIR/ub-slice-get-unchecked.rs:9:29
--> $DIR/ub-slice-get-unchecked.rs:7:29
|
LL | const B: &[()] = unsafe { A.get_unchecked(3..1) };
| ^^^^^^^^^^^^^^^^^^^