mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-22 04:34:51 +00:00
fix new lint error
This commit is contained in:
parent
837bc99065
commit
2a41d40807
@ -131,7 +131,7 @@ fn reduce_unit_expression<'a>(cx: &LateContext<'_>, expr: &'a hir::Expr<'_>) ->
|
||||
Some(expr.span)
|
||||
},
|
||||
hir::ExprKind::Block(ref block, _) => {
|
||||
match (&block.stmts[..], block.expr.as_ref()) {
|
||||
match (block.stmts, block.expr.as_ref()) {
|
||||
(&[], Some(inner_expr)) => {
|
||||
// If block only contains an expression,
|
||||
// reduce `{ X }` to `X`
|
||||
|
Loading…
Reference in New Issue
Block a user