]> git.lizzy.rs Git - rust.git/blob - src/docs/overly_complex_bool_expr.txt
new uninlined_format_args lint to inline explicit arguments
[rust.git] / src / docs / overly_complex_bool_expr.txt
1 ### What it does
2 Checks for boolean expressions that contain terminals that
3 can be eliminated.
4
5 ### Why is this bad?
6 This is most likely a logic bug.
7
8 ### Known problems
9 Ignores short circuiting behavior.
10
11 ### Example
12 ```
13 // The `b` is unnecessary, the expression is equivalent to `if a`.
14 if a && b || a { ... }
15 ```
16
17 Use instead:
18 ```
19 if a {}
20 ```