diff options
| author | Karl Meakin <karl.meakin@arm.com> | 2025-07-25 22:17:24 +0100 | 
|---|---|---|
| committer | Karl Meakin <karl.meakin@arm.com> | 2025-08-21 11:07:25 +0100 | 
| commit | 377a0c88a9bbfa8a389163b2ac3de38e64d762dc (patch) | |
| tree | b82f314b616471b15d785fe25ef60321b4f71850 /tests/codegen-llvm/integer-overflow.rs | |
| parent | 922958cffe059e9c156835df19d199ccd861c36a (diff) | |
| download | rust-377a0c88a9bbfa8a389163b2ac3de38e64d762dc.tar.gz rust-377a0c88a9bbfa8a389163b2ac3de38e64d762dc.zip | |
Consolidate panicking functions in `slice/index.rs`
Consolidate all the panicking functions in `slice/index.rs` to use a single `slice_index_fail` function, similar to how it is done in `str/traits.rs`.
Diffstat (limited to 'tests/codegen-llvm/integer-overflow.rs')
| -rw-r--r-- | tests/codegen-llvm/integer-overflow.rs | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/tests/codegen-llvm/integer-overflow.rs b/tests/codegen-llvm/integer-overflow.rs index 80362247a86..df7845be06d 100644 --- a/tests/codegen-llvm/integer-overflow.rs +++ b/tests/codegen-llvm/integer-overflow.rs @@ -10,7 +10,7 @@ pub struct S1<'a> { // CHECK-LABEL: @slice_no_index_order #[no_mangle] pub fn slice_no_index_order<'a>(s: &'a mut S1, n: usize) -> &'a [u8] { - // CHECK-NOT: slice_index_order_fail + // CHECK-COUNT-1: slice_index_fail let d = &s.data[s.position..s.position + n]; s.position += n; return d; @@ -19,6 +19,6 @@ pub fn slice_no_index_order<'a>(s: &'a mut S1, n: usize) -> &'a [u8] { // CHECK-LABEL: @test_check #[no_mangle] pub fn test_check<'a>(s: &'a mut S1, x: usize, y: usize) -> &'a [u8] { - // CHECK: slice_index_order_fail + // CHECK-COUNT-1: slice_index_fail &s.data[x..y] } | 
