make cargo test pass, again

This commit is contained in:
Centri3 2023-04-16 23:59:31 -05:00
parent a7c3301b58
commit a57445d4d6

View file

@ -125,14 +125,14 @@ impl LateLintPass<'_> for SemicolonBlock {
.. ..
} = stmt else { return }; } = stmt else { return };
semicolon_outside_block(cx, block, expr, span); semicolon_outside_block(cx, block, expr, span);
semicolon_outside_block_if_singleline_check_outside(cx, block, expr, stmt.span) semicolon_outside_block_if_singleline_check_outside(cx, block, expr, stmt.span);
}, },
StmtKind::Semi(Expr { StmtKind::Semi(Expr {
kind: ExprKind::Block(block @ Block { expr: Some(tail), .. }, _), kind: ExprKind::Block(block @ Block { expr: Some(tail), .. }, _),
.. ..
}) if !block.span.from_expansion() => { }) if !block.span.from_expansion() => {
semicolon_inside_block(cx, block, tail, stmt.span); semicolon_inside_block(cx, block, tail, stmt.span);
semicolon_outside_block_if_singleline_check_inside(cx, block, tail, stmt.span) semicolon_outside_block_if_singleline_check_inside(cx, block, tail, stmt.span);
}, },
_ => (), _ => (),
} }
@ -197,7 +197,7 @@ fn semicolon_outside_block_if_singleline_check_inside(
cx, cx,
SEMICOLON_OUTSIDE_BLOCK_IF_SINGLELINE, SEMICOLON_OUTSIDE_BLOCK_IF_SINGLELINE,
block.span, block.span,
&format!("consider moving the `;` inside the block for consistent formatting"), "consider moving the `;` inside the block for consistent formatting",
|diag| { |diag| {
multispan_sugg_with_applicability( multispan_sugg_with_applicability(
diag, diag,
@ -228,7 +228,7 @@ fn semicolon_outside_block_if_singleline_check_outside(
cx, cx,
SEMICOLON_OUTSIDE_BLOCK_IF_SINGLELINE, SEMICOLON_OUTSIDE_BLOCK_IF_SINGLELINE,
block.span, block.span,
&format!("consider moving the `;` outside the block for consistent formatting"), "consider moving the `;` outside the block for consistent formatting",
|diag| { |diag| {
multispan_sugg_with_applicability( multispan_sugg_with_applicability(
diag, diag,