1
Fork 0

Mark expr_requires_semi_to_be_stmt call sites

For each of these, we need to decide whether they need to be using
`expr_requires_semi_to_be_stmt`, or `expr_requires_comma_to_be_match_arm`,
which are supposed to be 2 different behaviors. Previously they were
conflated into one, causing either too much or too little
parenthesization.
This commit is contained in:
David Tolnay 2023-12-29 16:28:47 -08:00
parent b431eec6f2
commit cbb8714a3f
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
6 changed files with 11 additions and 9 deletions

View file

@ -688,7 +688,7 @@ trait UnusedDelimLint {
ExprKind::Index(base, _subscript, _) => base,
_ => break,
};
if !classify::expr_requires_semi_to_be_stmt(innermost) {
if !classify::expr_requires_semi_to_be_stmt_FIXME(innermost) {
return true;
}
}