Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnTitor committed Jan 5, 2020
1 parent 07f0615 commit 17cfc77
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion clippy_lints/src/assertions_on_constants.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion clippy_lints/src/panic_unimplemented.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 17cfc77

Please sign in to comment.