diff options
| author | bors <bors@rust-lang.org> | 2021-12-06 15:15:26 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-12-06 15:15:26 +0000 |
| commit | 9e0852705eb74ab5b840715d47226c707808735c (patch) | |
| tree | 2af331f1117837d4c56e175874caecb46b7f5611 /tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff | |
| parent | a5d597637dcb78dc73f93561ce474f23d4177c35 (diff) | |
| parent | 4a39707795862c8732aee0de07a075f5dc4e5036 (diff) | |
| download | rust-9e0852705eb74ab5b840715d47226c707808735c.tar.gz rust-9e0852705eb74ab5b840715d47226c707808735c.zip | |
Auto merge of #8066 - rust-lang:needless_bool_parenthesize, r=camsteffen
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.
We identify such expressions and add parentheses. Note that we don't make a difference between normal and unsafe blocks because the parsing problems are the same for both.
This fixes #8052.
---
changelog: none
Diffstat (limited to 'tests/mir-opt/lower_array_len.array_bound_mut.NormalizeArrayLen.panic-unwind.diff')
0 files changed, 0 insertions, 0 deletions
