Use a multipart suggestion for the parentheses

This commit is contained in:
Fabian Wolff 2021-08-03 21:23:29 +02:00
parent 470cbc0e2e
commit 7c81132a60
2 changed files with 11 additions and 6 deletions

View file

@ -35,11 +35,13 @@ warning: this labeled break expression is easy to confuse with an unlabeled brea
LL | / break 'label
LL | |
LL | | loop { break 42; };
| |_____________-----------------^
| |
| help: wrap this expression in parentheses: `(loop { break 42; })`
| |______________________________^
|
= note: `#[warn(break_with_label_and_loop)]` on by default
help: wrap this expression in parentheses
|
LL | (loop { break 42; });
| ^ ^
error: aborting due to 2 previous errors; 1 warning emitted