diff options
| author | Ralf Jung <post@ralfj.de> | 2024-09-08 08:54:01 +0200 |
|---|---|---|
| committer | Ralf Jung <post@ralfj.de> | 2024-09-08 23:08:43 +0200 |
| commit | 7a3a317618885a8949c8b95c9a38f3f9729b1f3c (patch) | |
| tree | 81b09cc0a118f7d65bdabca82ca3bbbb47dbb9a8 /tests/ui/consts/const-eval | |
| parent | 332fa6aa6ed70e285c155d112a30027947cad12b (diff) | |
| download | rust-7a3a317618885a8949c8b95c9a38f3f9729b1f3c.tar.gz rust-7a3a317618885a8949c8b95c9a38f3f9729b1f3c.zip | |
remove const_slice_index annotations, it never had a feature gate anyway
Diffstat (limited to 'tests/ui/consts/const-eval')
| -rw-r--r-- | tests/ui/consts/const-eval/ub-slice-get-unchecked.rs | 2 | ||||
| -rw-r--r-- | tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs index 3800abddd42..e805ac01c9d 100644 --- a/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs +++ b/tests/ui/consts/const-eval/ub-slice-get-unchecked.rs @@ -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, diff --git a/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr b/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr index de96821e8b9..94aa3ee4d7a 100644 --- a/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr +++ b/tests/ui/consts/const-eval/ub-slice-get-unchecked.stderr @@ -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) }; | ^^^^^^^^^^^^^^^^^^^ |
