fix tidy problem

This commit is contained in:
bravomikekilo 2019-08-03 02:17:20 +08:00
parent e64493e2d4
commit 4c1d892960
2 changed files with 12 additions and 3 deletions

View file

@ -387,7 +387,12 @@ fn check_unused_parens_expr(&self,
ast::ExprKind::Let(_, ref expr) => {
// FIXME(#60336): Properly handle `let true = (false && true)`
// actually needing the parenthesis.
self.check_unused_parens_expr(cx, expr, "`let` head expression", followed_by_block, None, None);
self.check_unused_parens_expr(
cx, expr,
"`let` head expression",
followed_by_block,
None, None
);
}
_ => {}
}
@ -408,7 +413,11 @@ fn check_unused_parens_pat(&self,
}
}
fn remove_outer_parens(cx: &EarlyContext<'_>, span: Span, pattern: &str, msg: &str, keep_space: (bool, bool)) {
fn remove_outer_parens(cx: &EarlyContext<'_>,
span: Span,
pattern: &str,
msg: &str,
keep_space: (bool, bool)) {
let span_msg = format!("unnecessary parentheses around {}", msg);
let mut err = cx.struct_span_lint(UNUSED_PARENS, span, &span_msg);
let mut ate_left_paren = false;

View file

@ -57,4 +57,4 @@ fn f() -> bool {
}
}
false
}
}