@@ -6,21 +6,21 @@ use rustc_session::{declare_tool_lint, impl_lint_pass};
6
6
use rustc_span:: source_map:: Span ;
7
7
8
8
declare_clippy_lint ! {
9
- /// **What it does:** Checks for integer arithmetic operations which could overflow or panic.
9
+ /// ### What it does
10
+ /// Checks for integer arithmetic operations which could overflow or panic.
10
11
///
11
12
/// Specifically, checks for any operators (`+`, `-`, `*`, `<<`, etc) which are capable
12
13
/// of overflowing according to the [Rust
13
14
/// Reference](https://doc.rust-lang.org/reference/expressions/operator-expr.html#overflow),
14
15
/// or which can panic (`/`, `%`). No bounds analysis or sophisticated reasoning is
15
16
/// attempted.
16
17
///
17
- /// **Why is this bad?** Integer overflow will trigger a panic in debug builds or will wrap in
18
+ /// ### Why is this bad?
19
+ /// Integer overflow will trigger a panic in debug builds or will wrap in
18
20
/// release mode. Division by zero will cause a panic in either mode. In some applications one
19
21
/// wants explicitly checked, wrapping or saturating arithmetic.
20
22
///
21
- /// **Known problems:** None.
22
- ///
23
- /// **Example:**
23
+ /// ### Example
24
24
/// ```rust
25
25
/// # let a = 0;
26
26
/// a + 1;
@@ -31,14 +31,14 @@ declare_clippy_lint! {
31
31
}
32
32
33
33
declare_clippy_lint ! {
34
- /// **What it does:** Checks for float arithmetic.
34
+ /// ### What it does
35
+ /// Checks for float arithmetic.
35
36
///
36
- /// **Why is this bad?** For some embedded systems or kernel development, it
37
+ /// ### Why is this bad?
38
+ /// For some embedded systems or kernel development, it
37
39
/// can be useful to rule out floating-point numbers.
38
40
///
39
- /// **Known problems:** None.
40
- ///
41
- /// **Example:**
41
+ /// ### Example
42
42
/// ```rust
43
43
/// # let a = 0.0;
44
44
/// a + 1.0;
0 commit comments