1
Fork 0

Improve docs

This commit is contained in:
mcarton 2016-07-16 00:25:44 +02:00
parent 26fdd3f2b7
commit caa76e119b
No known key found for this signature in database
GPG key ID: 5E427C794CBA45E8
55 changed files with 664 additions and 235 deletions

View file

@ -4,11 +4,15 @@ use utils::span_lint;
/// **What it does:** This lint finds 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.
/// **Why is this bad?** Most classic C underflow / overflow checks will fail in Rust. Users can
/// use functions like `overflowing_*` and `wrapping_*` instead.
///
/// **Known problems:** None.
///
/// **Example:** `a + b < a`
/// **Example:**
/// ```rust
/// a + b < a
/// ```
declare_lint!(pub OVERFLOW_CHECK_CONDITIONAL, Warn,
"Using overflow checks which are likely to panic");