rust/library
Matthias Krüger a5cc1f663f
Rollup merge of #124699 - scottmcm:split_at_unchecked_should_use_unchecked, r=Nilstrieb
Use `unchecked_sub` in `split_at`

LLVM currently isn't figuring it out on its own, even in the checked version where it hypothetically could.

Before: <https://rust.godbolt.org/z/PEY38YrKs>
```llvm
bb1:                                              ; preds = %start
  %4 = getelementptr inbounds float, ptr %x.0, i64 %n
  %5 = sub i64 %x.1, %n
```

After:
```llvm
bb1:                                              ; preds = %start
  %4 = getelementptr inbounds float, ptr %x.0, i64 %n
  %5 = sub nuw i64 %x.1, %n
```

This is not using the wrapper because there's already a ubcheck covering it, so I don't want this to get a second one once #121571 lands.

---

This is basically the same as #108763, since `split_at` is essentially doing two `get_unchecked`s.
2024-05-04 18:36:38 +02:00
..
alloc Rollup merge of #124593 - GKFX:cstr-literals-in-api-docs, r=workingjubilee 2024-05-03 20:33:46 +02:00
backtrace@e151306182
core Rollup merge of #124699 - scottmcm:split_at_unchecked_should_use_unchecked, r=Nilstrieb 2024-05-04 18:36:38 +02:00
panic_abort
panic_unwind
portable-simd Stabilise inline_const 2024-04-24 13:12:25 +01:00
proc_macro Replace version placeholders for 1.79 2024-05-01 21:01:51 -04:00
profiler_builtins
rtstartup
rustc-std-workspace-alloc
rustc-std-workspace-core
rustc-std-workspace-std
std Rollup merge of #122441 - a1phyr:improve_read_impls, r=ChrisDenton 2024-05-04 18:36:37 +02:00
stdarch@c0257c1660
sysroot
test Rollup merge of #124681 - risc0:erik/fix-test, r=joboet 2024-05-03 23:34:24 -04:00
unwind