File tree Expand file tree Collapse file tree
compiler/rustc_infer/src/infer Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -569,14 +569,6 @@ impl<'tcx> InferCtxtBuilder<'tcx> {
569569self
570570}
571571
572- pub fn with_defining_opaque_types (
573- mut self ,
574- defining_opaque_types : & ' tcx ty:: List < LocalDefId > ,
575- ) -> Self {
576- self . defining_opaque_types = defining_opaque_types;
577- self
578- }
579-
580572pub fn with_next_trait_solver ( mut self , next_trait_solver : bool ) -> Self {
581573self . next_trait_solver = next_trait_solver;
582574self
@@ -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`).
607599pub fn build_with_canonical < T > (
608- self ,
600+ mut self ,
609601span : Span ,
610602canonical : & Canonical < ' tcx , T > ,
611603) -> ( InferCtxt < ' tcx > , T , CanonicalVarValues < ' tcx > )
612604where
613605T : 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 ( ) ;
616609let ( value, args) = infcx. instantiate_canonical ( span, canonical) ;
617610( infcx, value, args)
618611}
You can’t perform that action at this time.
0 commit comments