rust/library/alloctests/tests
Jonathan Brouwer 6d625cc074
Rollup merge of #145024 - Kmeakin:km/optimize-slice-index/v3, r=Mark-Simulacrum
Optimize indexing slices and strs with inclusive ranges

Instead of separately checking for `end == usize::MAX` and `end + 1 > slice.len()`, we can check for `end >= slice.len()`. Also consolidate all the str indexing related panic functions into a single function which reports the correct error depending on the arguments, as the slice indexing code already does.

The downside of all this is that the panic message is slightly less specific when trying to index with `[..=usize::MAX]`: instead of saying "attempted to index str up to maximum usize" it just says "end byte index {end} out of bounds". But this is a rare enough case that I think it is acceptable
2026-02-14 22:11:52 +01:00
..
collections Address review comments and fix tests 2026-01-30 09:55:53 -05:00
sort Avoid miri error in slice::sort under Stacked Borrows 2026-01-28 14:55:29 +01:00
testing Rollup merge of #142668 - hkBst:less-static-mut, r=tgross35 2025-06-20 02:50:39 -04:00
alloc_test.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
arc.rs Add a test for Weak created from UniqueArc::downgrade 2025-03-29 12:13:38 +08:00
autotraits.rs Update tests with Range parameter to BTreeMap::extract_if etc. 2025-05-27 08:31:56 -07:00
borrow.rs Turn Cow::is_borrowed,is_owned into associated functions. 2025-07-07 11:22:53 +07:00
boxed.rs Stabilize alloc_layout_extra 2026-01-11 16:39:18 +03:00
btree_set_hash.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
c_str.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
c_str2.rs Rollup merge of #151383 - cyrgani:no-internal-deprecation, r=scottmcm 2026-01-27 12:50:52 +11:00
const_fns.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
cow_str.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
fmt.rs fmt tests: remove static mut 2025-06-18 12:29:22 +00:00
heap.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
lib.rs Remove or allow unused features in library doc and tests 2026-02-13 09:27:16 +08:00
linked_list.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
misc_tests.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
num.rs Add test for int_format_into feature 2025-07-03 18:57:16 +02:00
rc.rs Move last remaining Rc test to alloctests 2025-03-07 19:11:13 +00:00
slice.rs Added Clone implementation for ChunkBy 2025-03-10 11:12:26 -04:00
str.rs Make panic message less confusing 2026-02-10 23:19:01 +00:00
string.rs Move assert_matches to planned stable path 2026-01-21 23:17:24 +01:00
sync.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
task.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
thin_box.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00
vec.rs Move assert_matches to planned stable path 2026-01-21 23:17:24 +01:00
vec_deque.rs fix undefined behavior in VecDeque::splice 2026-01-27 19:30:37 -05:00
vec_deque_alloc_error.rs Move all alloc integration tests to a new alloctests crate 2025-03-07 19:11:11 +00:00