@@ -48,7 +48,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
48
48
fn check_stmt ( & mut self , cx : & LateContext < ' a , ' tcx > , stmt : & ' tcx Stmt < ' _ > ) {
49
49
if let StmtKind :: Local ( ref local) = stmt. kind {
50
50
if let Some ( init) = & local. init {
51
- if let Some ( init_ty) = cx. tables . node_type_opt ( init. hir_id ) {
51
+ if let Some ( init_ty) = cx. tables ( ) . node_type_opt ( init. hir_id ) {
52
52
let pat = & local. pat ;
53
53
if in_external_macro ( cx. sess ( ) , pat. span ) {
54
54
return ;
@@ -67,7 +67,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
67
67
if let ExprKind :: Match ( ref expr, arms, source) = expr. kind {
68
68
match source {
69
69
MatchSource :: Normal | MatchSource :: IfLetDesugar { .. } | MatchSource :: WhileLetDesugar => {
70
- if let Some ( expr_ty) = cx. tables . node_type_opt ( expr. hir_id ) {
70
+ if let Some ( expr_ty) = cx. tables ( ) . node_type_opt ( expr. hir_id ) {
71
71
' pattern_checks: for arm in arms {
72
72
let pat = & arm. pat ;
73
73
if in_external_macro ( cx. sess ( ) , pat. span ) {
@@ -93,7 +93,7 @@ impl<'a, 'tcx> LateLintPass<'a, 'tcx> for PatternTypeMismatch {
93
93
_: Span ,
94
94
hir_id : HirId ,
95
95
) {
96
- if let Some ( fn_sig) = cx. tables . liberated_fn_sigs ( ) . get ( hir_id) {
96
+ if let Some ( fn_sig) = cx. tables ( ) . liberated_fn_sigs ( ) . get ( hir_id) {
97
97
for ( param, ty) in body. params . iter ( ) . zip ( fn_sig. inputs ( ) . iter ( ) ) {
98
98
apply_lint ( cx, & param. pat , ty, DerefPossible :: Impossible ) ;
99
99
}
0 commit comments