Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Catching up with rustc changes
  • Loading branch information
phaylon committed Jul 3, 2020
commit 92ecc53691f3edd67526dca423a2b4083d12a221
6 changes: 3 additions & 3 deletions clippy_lints/src/pattern_type_mismatch.rs
Original file line number Diff line number Diff line change
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