rust/tests/ui/needless_bool
Andre Bogus 4a39707795 Parenthesize blocks in needless_bool suggestion
Because the `if .. {}` statement already puts the condition in
expression scope, contained blocks would be parsed as complete
statements, so any `&` binary expression whose left operand ended in a
block would lead to a non-compiling suggestion.

This adds a visitor to identify such expressions and add parentheses.

This fixes #8052.
2021-12-06 13:15:31 +01:00
..
fixable.fixed Parenthesize blocks in needless_bool suggestion 2021-12-06 13:15:31 +01:00
fixable.rs Parenthesize blocks in needless_bool suggestion 2021-12-06 13:15:31 +01:00
fixable.stderr Parenthesize blocks in needless_bool suggestion 2021-12-06 13:15:31 +01:00
simple.rs
simple.stderr