rust/library/core
bors 4e431fad67 Auto merge of #123561 - saethlin:str-unchecked-sub-index, r=scottmcm
Use unchecked_sub in str indexing

https://github.com/rust-lang/rust/pull/108763 applied this logic to indexing for slices, but of course `str` has its own separate impl.

Found this by skimming over the codegen for https://github.com/oxidecomputer/hubris/; their dist builds enable overflow checks so the lack of `unchecked_sub` was producing an impossible-to-hit overflow check and also inhibiting some inlining.

r? scottmcm
2024-04-07 12:49:15 +00:00
..
benches Add benches for net parsing 2024-03-04 18:46:24 -05:00
src Auto merge of #123561 - saethlin:str-unchecked-sub-index, r=scottmcm 2024-04-07 12:49:15 +00:00
tests Rollup merge of #122291 - lilasta:stabilize_const_location_fields, r=dtolnay 2024-04-06 13:00:05 +02:00
Cargo.toml Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00