diff options
Diffstat (limited to '')
-rw-r--r-- | src/tools/clippy/src/docs/overflow_check_conditional.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/tools/clippy/src/docs/overflow_check_conditional.txt b/src/tools/clippy/src/docs/overflow_check_conditional.txt new file mode 100644 index 000000000..a09cc18a0 --- /dev/null +++ b/src/tools/clippy/src/docs/overflow_check_conditional.txt @@ -0,0 +1,11 @@ +### What it does +Detects classic underflow/overflow checks. + +### Why is this bad? +Most classic C underflow/overflow checks will fail in +Rust. Users can use functions like `overflowing_*` and `wrapping_*` instead. + +### Example +``` +a + b < a; +```
\ No newline at end of file |