diff options
| author | bors <bors@rust-lang.org> | 2024-04-20 04:11:16 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-04-20 04:11:16 +0000 |
| commit | 9c7b1f4848263b7a39486a2cd482db0d632884e8 (patch) | |
| tree | 48a19b26eac885c5cfc72c4fd0136f9f8b8fbdac /compiler/rustc_parse/src/errors.rs | |
| parent | c8d19a92aa9022eb690899cf6d54fd23cb6877e5 (diff) | |
| parent | 986d9f104b2da25f7388ad824b9868c3ce1e5f21 (diff) | |
| download | rust-9c7b1f4848263b7a39486a2cd482db0d632884e8.tar.gz rust-9c7b1f4848263b7a39486a2cd482db0d632884e8.zip | |
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
Diffstat (limited to 'compiler/rustc_parse/src/errors.rs')
0 files changed, 0 insertions, 0 deletions
