Catching up with rustc changes
This commit is contained in:
parent
6447507ab1
commit
92ecc53691
@ -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 @@ fn check_expr(&mut self, cx: &LateContext<'a, 'tcx>, expr: &'tcx Expr<'_>) {
|
||||
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 @@ fn check_fn(
|
||||
_: 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, ¶m.pat, ty, DerefPossible::Impossible);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user