diff options
| author | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-05-04 01:38:42 -0700 |
|---|---|---|
| committer | Scott McMurray <scottmcm@users.noreply.github.com> | 2024-05-04 01:44:49 -0700 |
| commit | e1c833eb076efc5aef95d5c8ec9a410d8738def4 (patch) | |
| tree | 99e92d0a00c5e156aa3373a00c1a2ffdf9291f0c /compiler/rustc_pattern_analysis/src | |
| parent | 9fa862ff29ccfea885f8b1f33f4a507d456ae551 (diff) | |
| download | rust-e1c833eb076efc5aef95d5c8ec9a410d8738def4.tar.gz rust-e1c833eb076efc5aef95d5c8ec9a410d8738def4.zip | |
Docs: suggest `uN::checked_sub` instead of check-then-unchecked
As of 124114 it's exactly the same in codegen, so might as well not use `unsafe`. Note that this is only for *unsigned*, since the overflow conditions for `iN::checked_sub` are more complicated.
Diffstat (limited to 'compiler/rustc_pattern_analysis/src')
0 files changed, 0 insertions, 0 deletions
