Some new nice warnings added to GCC6:
https://gnu.wildebeest.org/blog/mjw/2016/02/15/looking-forward-to-gcc6-many-new-warnings/
-Wlogical-op
warns when the operands of a logical operator are the same:
if (point.x < 0 || point.x < 0)
-Wduplicated-cond
catches duplicated tests in if-else-if chains like:
if (foo) {
} else if (foo) {
...
}
-Wtautological-compare
detects comparisons of variables against themselves:
if (x > x) {
All such bugs are quite common. And I guess they are present in Rust code too. But such lints are perhaps better inside Clippy...