mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-24 21:05:12 +00:00
![]() Fix `manual_range_contains` false negative with chains of `&&` and `||`
Fixes #8745
Since the precedence for `&&` is the same as itself the HIR for a chain of `&&` ends up with a right skewed tree like:
```
&&
/ \
&& c2
/ \
... c1
```
So only the leftmost `&&` was actually "fully" checked, the top level was just `c2` and `&&` so the `manual_range_contains` lint won't apply. This change makes it also check `c2` with `c1`.
There's a bit of a hacky solution in the [second commit](
|
||
---|---|---|
.. | ||
src | ||
Cargo.toml | ||
README.md |