about summary refs log tree commit diff
diff options
context:
space:
mode:
authorRobert Sedlacek <rs@474.at>2020-07-01 15:49:06 +0200
committerRobert Sedlacek <rs@474.at>2020-07-03 18:12:29 +0200
commit92ecc53691f3edd67526dca423a2b4083d12a221 (patch)
treee53a3576564886d89e4a41bbe045b7e39225768c
parent6447507ab150ebd1787ca6af385db49dfdf45978 (diff)
downloadrust-92ecc53691f3edd67526dca423a2b4083d12a221.tar.gz
rust-92ecc53691f3edd67526dca423a2b4083d12a221.zip
Catching up with rustc changes
-rw-r--r--clippy_lints/src/pattern_type_mismatch.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/clippy_lints/src/pattern_type_mismatch.rs b/clippy_lints/src/pattern_type_mismatch.rs
index a6079a8b5bc..fcc9b16068f 100644
--- a/clippy_lints/src/pattern_type_mismatch.rs
+++ b/clippy_lints/src/pattern_type_mismatch.rs
@@ -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;
@@ -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) {
@@ -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);
             }