From 4c1d892960d92005bcd7c492f777ca45f1d55cea Mon Sep 17 00:00:00 2001 From: bravomikekilo Date: Sat, 3 Aug 2019 02:17:20 +0800 Subject: [PATCH] fix tidy problem --- src/librustc_lint/unused.rs | 13 +++++++++++-- .../ui/lint/used_parens_remove_json_suggestion.rs | 2 +- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/librustc_lint/unused.rs b/src/librustc_lint/unused.rs index 5880e593503..634b06d9bb2 100644 --- a/src/librustc_lint/unused.rs +++ b/src/librustc_lint/unused.rs @@ -387,7 +387,12 @@ impl UnusedParens { 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 @@ impl UnusedParens { } } - 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; diff --git a/src/test/ui/lint/used_parens_remove_json_suggestion.rs b/src/test/ui/lint/used_parens_remove_json_suggestion.rs index 3189606aaa9..3af11428b95 100644 --- a/src/test/ui/lint/used_parens_remove_json_suggestion.rs +++ b/src/test/ui/lint/used_parens_remove_json_suggestion.rs @@ -57,4 +57,4 @@ fn f() -> bool { } } false -} \ No newline at end of file +}