Skip to content

Commit deeb0c5

Browse files
committed
Inline and remove InferCtxtBuilder::with_defining_opaque_types.
It has a single use.
1 parent 0ca4784 commit deeb0c5

1 file changed

Lines changed: 3 additions & 10 deletions

File tree

  • compiler/rustc_infer/src/infer

‎compiler/rustc_infer/src/infer/mod.rs‎

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -569,14 +569,6 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
569569
self
570570
}
571571

572-
pubfnwith_defining_opaque_types(
573-
mutself,
574-
defining_opaque_types:&'tcx ty::List<LocalDefId>,
575-
) -> Self{
576-
self.defining_opaque_types = defining_opaque_types;
577-
self
578-
}
579-
580572
pubfnwith_next_trait_solver(mutself,next_trait_solver:bool) -> Self{
581573
self.next_trait_solver = next_trait_solver;
582574
self
@@ -605,14 +597,15 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
605597
/// the bound values in `C` to their instantiated values in `V`
606598
/// (in other words, `S(C) = V`).
607599
pubfnbuild_with_canonical<T>(
608-
self,
600+
mutself,
609601
span:Span,
610602
canonical:&Canonical<'tcx,T>,
611603
) -> (InferCtxt<'tcx>,T,CanonicalVarValues<'tcx>)
612604
where
613605
T:TypeFoldable<TyCtxt<'tcx>>,
614606
{
615-
let infcx = self.with_defining_opaque_types(canonical.defining_opaque_types).build();
607+
self.defining_opaque_types = canonical.defining_opaque_types;
608+
let infcx = self.build();
616609
let(value, args) = infcx.instantiate_canonical(span, canonical);
617610
(infcx, value, args)
618611
}

0 commit comments

Comments
 (0)