bors 9e0852705e 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
2021-12-06 15:15:26 +00:00
..
2021-11-10 16:37:55 -06:00
2021-11-20 18:49:30 +09:00
2021-11-17 08:38:45 +08:00
2021-11-17 08:38:45 +08:00
2021-11-17 08:38:45 +08:00
2021-11-23 15:08:49 +00:00
2021-11-23 15:08:49 +00:00
2021-11-17 08:38:45 +08:00
2021-11-17 08:38:45 +08:00
2021-11-17 08:38:45 +08:00
2021-11-19 16:17:17 +09:00
2021-11-19 16:17:17 +09:00
2021-11-23 15:08:49 +00:00
2021-11-20 09:40:11 +01:00
2021-11-20 09:40:11 +01:00
2021-11-21 14:28:44 +08:00
2021-11-21 14:28:44 +08:00
2021-11-17 08:38:45 +08:00
2021-11-17 08:38:45 +08:00
2021-11-26 18:34:07 +09:00
2021-11-26 18:49:14 +09:00