1
Fork 0

Macro call with braces does not require semicolon to be statement

This commit by itself is supposed to have no effect on behavior. All of
the call sites are updated to preserve their previous behavior.

The behavior changes are in the commits that follow.
This commit is contained in:
David Tolnay 2023-12-29 16:30:34 -08:00
parent cbb8714a3f
commit 9e1cf2098d
No known key found for this signature in database
GPG key ID: F9BA143B95FF6D82
6 changed files with 50 additions and 23 deletions

View file

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