diff options
| author | Esteban Küber <esteban@kuber.com.ar> | 2023-08-14 19:25:01 +0000 |
|---|---|---|
| committer | Esteban Küber <esteban@kuber.com.ar> | 2023-08-14 21:43:56 +0000 |
| commit | 89fdc3e383c3ebe3a2cbddd7b49cbfe6a6cf0cf5 (patch) | |
| tree | 3ccc623cae639d1d590fbd971e96702888e7c213 /clippy_lints/src/methods | |
| parent | b8b3e078f99da9f07c0323eca895c2d4e431a4a4 (diff) | |
| download | rust-89fdc3e383c3ebe3a2cbddd7b49cbfe6a6cf0cf5.tar.gz rust-89fdc3e383c3ebe3a2cbddd7b49cbfe6a6cf0cf5.zip | |
Move scrutinee `HirId` into `MatchSource::TryDesugar`
Diffstat (limited to 'clippy_lints/src/methods')
| -rw-r--r-- | clippy_lints/src/methods/clone_on_copy.rs | 2 | ||||
| -rw-r--r-- | clippy_lints/src/methods/str_splitn.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/clippy_lints/src/methods/clone_on_copy.rs b/clippy_lints/src/methods/clone_on_copy.rs index 7eb325ee7b5..eb4f003d38a 100644 --- a/clippy_lints/src/methods/clone_on_copy.rs +++ b/clippy_lints/src/methods/clone_on_copy.rs @@ -64,7 +64,7 @@ pub(super) fn check( ExprKind::Path(QPath::LangItem(rustc_hir::LangItem::TryTraitBranch, _, _)) ), ExprKind::MethodCall(_, self_arg, ..) if expr.hir_id == self_arg.hir_id => true, - ExprKind::Match(_, _, MatchSource::TryDesugar | MatchSource::AwaitDesugar) + ExprKind::Match(_, _, MatchSource::TryDesugar(_) | MatchSource::AwaitDesugar) | ExprKind::Field(..) | ExprKind::Index(..) => true, _ => false, diff --git a/clippy_lints/src/methods/str_splitn.rs b/clippy_lints/src/methods/str_splitn.rs index 41986551da4..7016ad0a80f 100644 --- a/clippy_lints/src/methods/str_splitn.rs +++ b/clippy_lints/src/methods/str_splitn.rs @@ -236,7 +236,7 @@ fn indirect_usage<'tcx>( !matches!( node, Node::Expr(Expr { - kind: ExprKind::Match(.., MatchSource::TryDesugar), + kind: ExprKind::Match(.., MatchSource::TryDesugar(_)), .. }) ) |
