diff options
| author | Andre Bogus <bogusandre@gmail.com> | 2021-12-02 22:47:57 +0100 |
|---|---|---|
| committer | Andre Bogus <bogusandre@gmail.com> | 2021-12-06 13:15:31 +0100 |
| commit | 4a39707795862c8732aee0de07a075f5dc4e5036 (patch) | |
| tree | 2f3180dcab2b34aefa63825e9b5c5fe7a42ce586 /tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff | |
| parent | d5d830a50f0a0211bd0820aa8403df8d47f109c3 (diff) | |
| download | rust-4a39707795862c8732aee0de07a075f5dc4e5036.tar.gz rust-4a39707795862c8732aee0de07a075f5dc4e5036.zip | |
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.
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
