about summary refs log tree commit diff
path: root/compiler
diff options
context:
space:
mode:
authorYuki Okushi <huyuumi.dev@gmail.com>2021-03-02 21:23:19 +0900
committerGitHub <noreply@github.com>2021-03-02 21:23:19 +0900
commit43bcfdb0d027ad5eb702360b03f28c95bc899fe5 (patch)
treee6c681a8d675badf6f90fe7ada147957650b0d5e /compiler
parent543ef7f13c03c495d31b42dde32c7ddce0d2fb15 (diff)
parent854fffde5d491e5a6faddcda99b2a2f36801c71f (diff)
downloadrust-43bcfdb0d027ad5eb702360b03f28c95bc899fe5.tar.gz
rust-43bcfdb0d027ad5eb702360b03f28c95bc899fe5.zip
Rollup merge of #82597 - noslaver:fix-82137, r=nagisa
Get TyCtxt from self instead of passing as argument in AutoTraitFinder

First contribution :crab:, let me know if anything is amiss.

Fix #82137.
Diffstat (limited to 'compiler')
-rw-r--r--compiler/rustc_trait_selection/src/traits/auto_trait.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/rustc_trait_selection/src/traits/auto_trait.rs b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
index 97cc258d425..6510c9464e1 100644
--- a/compiler/rustc_trait_selection/src/traits/auto_trait.rs
+++ b/compiler/rustc_trait_selection/src/traits/auto_trait.rs
@@ -77,7 +77,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
         ty: Ty<'tcx>,
         orig_env: ty::ParamEnv<'tcx>,
         trait_did: DefId,
-        mut auto_trait_callback: impl FnMut(&InferCtxt<'_, 'tcx>, AutoTraitInfo<'tcx>) -> A,
+        mut auto_trait_callback: impl FnMut(AutoTraitInfo<'tcx>) -> A,
     ) -> AutoTraitResult<A> {
         let tcx = self.tcx;
 
@@ -211,7 +211,7 @@ impl<'tcx> AutoTraitFinder<'tcx> {
 
             let info = AutoTraitInfo { full_user_env, region_data, vid_to_region };
 
-            AutoTraitResult::PositiveImpl(auto_trait_callback(&infcx, info))
+            AutoTraitResult::PositiveImpl(auto_trait_callback(info))
         })
     }
 }