From 17cfc77bd6518f68840ad83ea05990fcbfcb5d04 Mon Sep 17 00:00:00 2001 From: Yuki Okushi Date: Sun, 5 Jan 2020 15:43:41 +0900 Subject: [PATCH] Rustup to rust-lang/rust#67137 --- clippy_lints/src/assertions_on_constants.rs | 2 +- clippy_lints/src/panic_unimplemented.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/clippy_lints/src/assertions_on_constants.rs b/clippy_lints/src/assertions_on_constants.rs index 6c24ccfc3..ee4f92925 100644 --- a/clippy_lints/src/assertions_on_constants.rs +++ b/clippy_lints/src/assertions_on_constants.rs @@ -130,7 +130,7 @@ fn match_assert_with_message<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx E if let Some(begin_panic_call) = &inner_block.expr; // function call if let Some(args) = match_function_call(cx, begin_panic_call, &paths::BEGIN_PANIC); - if args.len() == 2; + if args.len() == 1; // bind the second argument of the `assert!` macro if it exists if let panic_message = snippet_opt(cx, args[0].span); // second argument of begin_panic is irrelevant diff --git a/clippy_lints/src/panic_unimplemented.rs b/clippy_lints/src/panic_unimplemented.rs index 93c0cbff0..007b49cbf 100644 --- a/clippy_lints/src/panic_unimplemented.rs +++ b/clippy_lints/src/panic_unimplemented.rs @@ -98,7 +98,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PanicUnimplemented { if let ExprKind::Block(ref block, _) = expr.kind; if let Some(ref ex) = block.expr; if let Some(params) = match_function_call(cx, ex, &paths::BEGIN_PANIC); - if params.len() == 2; + if params.len() == 1; then { if is_expn_of(expr.span, "unimplemented").is_some() { let span = get_outer_span(expr);