about summary refs log tree commit diff
path: root/compiler/rustc_pattern_analysis/src
diff options
context:
space:
mode:
authorScott McMurray <scottmcm@users.noreply.github.com>2024-05-04 01:38:42 -0700
committerScott McMurray <scottmcm@users.noreply.github.com>2024-05-04 01:44:49 -0700
commite1c833eb076efc5aef95d5c8ec9a410d8738def4 (patch)
tree99e92d0a00c5e156aa3373a00c1a2ffdf9291f0c /compiler/rustc_pattern_analysis/src
parent9fa862ff29ccfea885f8b1f33f4a507d456ae551 (diff)
downloadrust-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