Move scrutinee HirId into MatchSource::TryDesugar
This commit is contained in:
parent
b8b3e078f9
commit
89fdc3e383
14 changed files with 15 additions and 14 deletions
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -236,7 +236,7 @@ fn indirect_usage<'tcx>(
|
|||
!matches!(
|
||||
node,
|
||||
Node::Expr(Expr {
|
||||
kind: ExprKind::Match(.., MatchSource::TryDesugar),
|
||||
kind: ExprKind::Match(.., MatchSource::TryDesugar(_)),
|
||||
..
|
||||
})
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue