os-rust/library/core
bors 9c7b1f4848 Auto merge of #124114 - scottmcm:better-checked, r=workingjubilee
Make `checked` ops emit *unchecked* LLVM operations where feasible

For things with easily pre-checked overflow conditions -- shifts and unsigned subtraction -- write the checked methods in such a way that we stop emitting wrapping versions of them.

For example, today <https://rust.godbolt.org/z/qM9YK8Txb> neither
```rust
a.checked_sub(b).unwrap()
```
nor
```rust
a.checked_sub(b).unwrap_unchecked()
```
actually optimizes to `sub nuw`.  After this PR they do.

cc #103299
2024-04-20 04:11:16 +00:00
..
benches disable benches in Miri 2024-04-07 09:58:10 +02:00
src Auto merge of #124114 - scottmcm:better-checked, r=workingjubilee 2024-04-20 04:11:16 +00:00
tests Stabilize (const_)slice_ptr_len and (const_)slice_ptr_is_empty_nonnull 2024-04-12 21:23:20 +02:00
Cargo.toml Import the 2021 prelude in the core crate 2024-03-25 13:12:06 -07:00