diff options
| author | Rémy Rakic <remy.rakic+github@gmail.com> | 2025-01-18 22:08:53 +0000 |
|---|---|---|
| committer | Josh Stone <jistone@redhat.com> | 2025-02-06 09:53:26 -0800 |
| commit | c6063d45b7f9a4a4c33dd5f832b464b468ca32a1 (patch) | |
| tree | 41652b27471a8657bd3da6df2f5d3e5a8e87093b /tests | |
| parent | 7302b302d08e3d884d75a688a5a38c53be78bd87 (diff) | |
| download | rust-c6063d45b7f9a4a4c33dd5f832b464b468ca32a1.tar.gz rust-c6063d45b7f9a4a4c33dd5f832b464b468ca32a1.zip | |
Revert "Rollup merge of #134371 - scottmcm:fix-134352, r=oli-obk"
This reverts commit 7c301ecdf5e806b7aa3c44e4a185049fabbc4381, reversing changes made to dffaad83327454430129802f240121f8c7866208. (cherry picked from commit 0bb4880581a6963e0b895f9550e9147c68b9537a)
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/const-generics/issues/index_array_bad_type.rs | 15 | ||||
| -rw-r--r-- | tests/ui/const-generics/issues/index_array_bad_type.stderr | 8 |
2 files changed, 0 insertions, 23 deletions
diff --git a/tests/ui/const-generics/issues/index_array_bad_type.rs b/tests/ui/const-generics/issues/index_array_bad_type.rs deleted file mode 100644 index 41e4dba026c..00000000000 --- a/tests/ui/const-generics/issues/index_array_bad_type.rs +++ /dev/null @@ -1,15 +0,0 @@ -//@ check-fail -//@ compile-flags: -C opt-level=0 - -#![crate_type = "lib"] - -// This used to fail in the known-panics lint, as the MIR was ill-typed due to -// the length constant not actually having type usize. -// https://github.com/rust-lang/rust/issues/134352 - -pub struct BadStruct<const N: i64>(pub [u8; N]); -//~^ ERROR: the constant `N` is not of type `usize` - -pub fn bad_array_length_type(value: BadStruct<3>) -> u8 { - value.0[0] -} diff --git a/tests/ui/const-generics/issues/index_array_bad_type.stderr b/tests/ui/const-generics/issues/index_array_bad_type.stderr deleted file mode 100644 index e4417192150..00000000000 --- a/tests/ui/const-generics/issues/index_array_bad_type.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: the constant `N` is not of type `usize` - --> $DIR/index_array_bad_type.rs:10:40 - | -LL | pub struct BadStruct<const N: i64>(pub [u8; N]); - | ^^^^^^^ expected `usize`, found `i64` - -error: aborting due to 1 previous error - |
