]> git.lizzy.rs Git - rust.git/blob - src/docs/overflow_check_conditional.txt
[Arithmetic] Consider literals
[rust.git] / src / docs / overflow_check_conditional.txt
1 ### What it does
2 Detects classic underflow/overflow checks.
3
4 ### Why is this bad?
5 Most classic C underflow/overflow checks will fail in
6 Rust. Users can use functions like `overflowing_*` and `wrapping_*` instead.
7
8 ### Example
9 ```
10 a + b < a;
11 ```