Skip to content

Commit 17cfc77

Browse files
committed
1 parent 07f0615 commit 17cfc77

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

clippy_lints/src/assertions_on_constants.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ fn match_assert_with_message<'a, 'tcx>(cx: &LateContext<'a, 'tcx>, expr: &'tcx E
130130
if let Some(begin_panic_call) = &inner_block.expr;
131131
// function call
132132
if let Some(args) = match_function_call(cx, begin_panic_call, &paths::BEGIN_PANIC);
133-
if args.len() == 2;
133+
if args.len() == 1;
134134
// bind the second argument of the `assert!` macro if it exists
135135
if let panic_message = snippet_opt(cx, args[0].span);
136136
// second argument of begin_panic is irrelevant

clippy_lints/src/panic_unimplemented.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PanicUnimplemented {
9898
if let ExprKind::Block(ref block, _) = expr.kind;
9999
if let Some(ref ex) = block.expr;
100100
if let Some(params) = match_function_call(cx, ex, &paths::BEGIN_PANIC);
101-
if params.len() == 2;
101+
if params.len() == 1;
102102
then {
103103
if is_expn_of(expr.span, "unimplemented").is_some() {
104104
let span = get_outer_span(expr);

0 commit comments

Comments
 (0)