Make LateCtxt be a type info delegate for EUV for clippy
This commit is contained in:
parent
dfc9c9132b
commit
db193c1c9d
9 changed files with 21 additions and 60 deletions
|
|
@ -6,7 +6,6 @@ use rustc_errors::Applicability;
|
|||
use rustc_hir::intravisit::{walk_expr, walk_fn, FnKind, Visitor};
|
||||
use rustc_hir::{BinOpKind, Body, Expr, ExprKind, FnDecl, HirId, Node, PathSegment, UnOp};
|
||||
use rustc_hir_typeck::expr_use_visitor::{Delegate, ExprUseVisitor, PlaceWithHirId};
|
||||
use rustc_infer::infer::TyCtxtInferExt;
|
||||
use rustc_lint::{LateContext, LateLintPass};
|
||||
use rustc_middle::hir::nested_filter;
|
||||
use rustc_middle::lint::in_external_macro;
|
||||
|
|
@ -252,13 +251,10 @@ impl<'a, 'tcx> UnwrappableVariablesVisitor<'a, 'tcx> {
|
|||
local_id: unwrap_info.local_id,
|
||||
};
|
||||
|
||||
let infcx = self.cx.tcx.infer_ctxt().build();
|
||||
let vis = ExprUseVisitor::new(
|
||||
&mut delegate,
|
||||
&infcx,
|
||||
let vis = ExprUseVisitor::for_clippy(
|
||||
self.cx,
|
||||
cond.hir_id.owner.def_id,
|
||||
self.cx.param_env,
|
||||
self.cx.typeck_results(),
|
||||
&mut delegate,
|
||||
);
|
||||
vis.walk_expr(cond);
|
||||
vis.walk_expr(branch);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue