Skip to content

Commit 4c1d892

Browse files
committed
fix tidy problem
1 parent e64493e commit 4c1d892

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

src/librustc_lint/unused.rs

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -387,7 +387,12 @@ impl UnusedParens {
387387
ast::ExprKind::Let(_, ref expr) => {
388388
// FIXME(#60336): Properly handle `let true = (false && true)`
389389
// actually needing the parenthesis.
390-
self.check_unused_parens_expr(cx, expr, "`let` head expression", followed_by_block, None, None);
390+
self.check_unused_parens_expr(
391+
cx, expr,
392+
"`let` head expression",
393+
followed_by_block,
394+
None, None
395+
);
391396
}
392397
_ => {}
393398
}
@@ -408,7 +413,11 @@ impl UnusedParens {
408413
}
409414
}
410415

411-
fn remove_outer_parens(cx: &EarlyContext<'_>, span: Span, pattern: &str, msg: &str, keep_space: (bool, bool)) {
416+
fn remove_outer_parens(cx: &EarlyContext<'_>,
417+
span: Span,
418+
pattern: &str,
419+
msg: &str,
420+
keep_space: (bool, bool)) {
412421
let span_msg = format!("unnecessary parentheses around {}", msg);
413422
let mut err = cx.struct_span_lint(UNUSED_PARENS, span, &span_msg);
414423
let mut ate_left_paren = false;

src/test/ui/lint/used_parens_remove_json_suggestion.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,4 @@ fn f() -> bool {
5757
}
5858
}
5959
false
60-
}
60+
}

0 commit comments

Comments
 (0)