Fix liballoc test suite for Miri by RalfJung · Pull Request #76662 · rust-lang/rust (original) (raw)

Mostly, fix the regression introduced by #75207 that caused slices (i.e., references) to be created to invalid memory or memory that has aliasing pointers that we want to keep valid. @dylni this changes the type of check_range to only require the length, not the full reference to the slice, which indeed is all the information this function requires.

Also reduce the size of a test introduced in #70793 to make it not take 3 minutes in Miri.

This makes https://github.com/RalfJung/miri-test-libstd work again.