Skip to content

Commit

Permalink
Catching up with rustc changes
Browse files Browse the repository at this point in the history
  • Loading branch information
phaylon committed Jul 3, 2020
1 parent 6447507 commit 92ecc53
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions clippy_lints/src/pattern_type_mismatch.rs
Expand Up @@ -48,7 +48,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
fn check_stmt(&mut self, cx: &LateContext<'a, 'tcx>, stmt: &'tcx Stmt<'_>) {
if let StmtKind::Local(ref local) = stmt.kind {
if let Some(init) = &local.init {
if let Some(init_ty) = cx.tables.node_type_opt(init.hir_id) {
if let Some(init_ty) = cx.tables().node_type_opt(init.hir_id) {
let pat = &local.pat;
if in_external_macro(cx.sess(), pat.span) {
return;
Expand All @@ -67,7 +67,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
if let ExprKind::Match(ref expr, arms, source) = expr.kind {
match source {
MatchSource::Normal | MatchSource::IfLetDesugar { .. } | MatchSource::WhileLetDesugar => {
if let Some(expr_ty) = cx.tables.node_type_opt(expr.hir_id) {
if let Some(expr_ty) = cx.tables().node_type_opt(expr.hir_id) {
'pattern_checks: for arm in arms {
let pat = &arm.pat;
if in_external_macro(cx.sess(), pat.span) {
Expand All @@ -93,7 +93,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
_: Span,
hir_id: HirId,
) {
if let Some(fn_sig) = cx.tables.liberated_fn_sigs().get(hir_id) {
if let Some(fn_sig) = cx.tables().liberated_fn_sigs().get(hir_id) {
for (param, ty) in body.params.iter().zip(fn_sig.inputs().iter()) {
apply_lint(cx, &param.pat, ty, DerefPossible::Impossible);
}
Expand Down

0 comments on commit 92ecc53

Please sign in to comment.