diff options
| author | Cameron Steffen <cam.steffen94@gmail.com> | 2022-09-19 22:03:59 -0500 |
|---|---|---|
| committer | Cameron Steffen <cam.steffen94@gmail.com> | 2022-10-07 07:10:40 -0500 |
| commit | 6819e85501348c6fab3c5d40d0e31d5c7d00bb6a (patch) | |
| tree | c0252f097458ae5f6b84b9cbdf830b3f271c399e /clippy_utils/src/usage.rs | |
| parent | 3b328e704953e34de401166cd76ca062e21d83d8 (diff) | |
Change InferCtxtBuilder from enter to build
Diffstat (limited to 'clippy_utils/src/usage.rs')
| -rw-r--r-- | clippy_utils/src/usage.rs | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/clippy_utils/src/usage.rs b/clippy_utils/src/usage.rs index b5ec3fef3e0..e32bae6ed1f 100644 --- a/clippy_utils/src/usage.rs +++ b/clippy_utils/src/usage.rs @@ -18,16 +18,15 @@ pub fn mutated_variables<'tcx>(expr: &'tcx Expr<'_>, cx: &LateContext<'tcx>) -> used_mutably: HirIdSet::default(), skip: false, }; - cx.tcx.infer_ctxt().enter(|infcx| { - ExprUseVisitor::new( - &mut delegate, - &infcx, - expr.hir_id.owner.def_id, - cx.param_env, - cx.typeck_results(), - ) - .walk_expr(expr); - }); + let infcx = cx.tcx.infer_ctxt().build(); + ExprUseVisitor::new( + &mut delegate, + &infcx, + expr.hir_id.owner.def_id, + cx.param_env, + cx.typeck_results(), + ) + .walk_expr(expr); if delegate.skip { return None; |
