mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-04 11:17:04 +00:00

Don't do pointer arithmetic on pointers to deallocated memory vec::Splice can invalidate the slice::Iter inside vec::Drain. So we replace them with dangling pointers which, unlike ones to deallocated memory, are allowed. Fixes miri test failures. Fixes https://github.com/rust-lang/miri/issues/2759