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:
parent
b431eec6f2
commit
cbb8714a3f
6 changed files with 11 additions and 9 deletions
|
@ -42,7 +42,8 @@ use crate::{ast, token::Delimiter};
|
|||
/// _ => m! {} - 1, // binary subtraction operator
|
||||
/// }
|
||||
/// ```
|
||||
pub fn expr_requires_semi_to_be_stmt(e: &ast::Expr) -> bool {
|
||||
#[allow(non_snake_case)]
|
||||
pub fn expr_requires_semi_to_be_stmt_FIXME(e: &ast::Expr) -> bool {
|
||||
!matches!(
|
||||
e.kind,
|
||||
ast::ExprKind::If(..)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue