From 999ba0f51f72d3ec500f95efc503d91e870436ce Mon Sep 17 00:00:00 2001 From: Samuel Moelius Date: Wed, 29 Dec 2021 19:34:23 +0000 Subject: [PATCH] Account for https://github.com/rust-lang/rust/pull/80357 --- .../src/question_mark_in_expression.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/question_mark_in_expression/src/question_mark_in_expression.rs b/examples/question_mark_in_expression/src/question_mark_in_expression.rs index 81039ced2..7aa81ef52 100644 --- a/examples/question_mark_in_expression/src/question_mark_in_expression.rs +++ b/examples/question_mark_in_expression/src/question_mark_in_expression.rs @@ -43,9 +43,9 @@ impl<'tcx> LateLintPass<'tcx> for QuestionMarkInExpression { if let Some(node_id) = get_non_into_iter_ancestor(cx, expr.hir_id); if let Node::Expr(ancestor) = cx.tcx.hir().get(node_id); then { - // smoelius: Matches get a pass. + // smoelius: `Let` and `Match` expressions get a pass. match ancestor.kind { - ExprKind::Match(..) => {} + ExprKind::Let(..) | ExprKind::Match(..) => {} _ => { span_lint_and_help( cx,