Get TyCtxt from self instead of passing as argument in AutoTraitFinder
methods
This commit is contained in:
parent
5233edcf1c
commit
854fffde5d
2 changed files with 14 additions and 17 deletions
|
@ -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))
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue