granite-rust/library/core
bors 9ed0bf9f2b Auto merge of #99223 - saethlin:panicless-split-mut, r=Mark-Simulacrum
Rearrange slice::split_mut to remove bounds check

Closes https://github.com/rust-lang/rust/issues/86313

Turns out that all we need to do here is reorder the bounds checks to convince LLVM that all the bounds checks can be removed. It seems like LLVM just fails to propagate the original length information past the first bounds check and into the second one. With this implementation it doesn't need to, each check can be proven inbounds based on the one immediately previous.

I've gradually convinced myself that this implementation is unambiguously better based on the above logic, but maybe this is still deserving of a codegen test?

Also the mentioned borrowck limitation no longer seems to exist.
2022-07-18 10:16:58 +00:00
..
benches Add unicode fast path to is_printable 2022-05-31 10:51:35 +02:00
primitive_docs Add primitive documentation to libcore 2021-09-12 02:23:08 +00:00
src Auto merge of #99223 - saethlin:panicless-split-mut, r=Mark-Simulacrum 2022-07-18 10:16:58 +00:00
tests Rollup merge of #99306 - JohnTitor:stabilize-future-poll-fn, r=joshtriplett 2022-07-17 13:08:52 +09:00
Cargo.toml Avoid use of rand::thread_rng in stdlib benchmarks 2022-05-02 00:08:21 -07:00