fn instantiate_method_sig(&mut self,
                              pick: &probe::Pick<'tcx>,
                              all_substs: &'tcx Substs<'tcx>)
                              -> (ty::FnSig<'tcx>, ty::InstantiatedPredicates<'tcx>) {
        debug!("instantiate_method_sig(pick={:?}, all_substs={:?})",
               pick,
               all_substs);

        // Instantiate the bounds on the method with the
        // type/early-bound-regions substitutions performed. There can
        // be no late-bound regions appearing here.
        let def_id = pick.item.def_id;
        let method_predicates = self.tcx.predicates_of(def_id)
                                    .instantiate(self.tcx, all_substs);

        debug!("method_predicates after subst = {:?}", method_predicates);

        let sig = self.tcx.fn_sig(def_id);

        // Instantiate late-bound regions and substitute the trait
        // parameters into the method type to get the actual method type.
        //
        // NB: Instantiate late-bound regions first so that
        // `instantiate_type_scheme` can normalize associated types that
        // may reference those regions.
        let method_sig = self.replace_late_bound_regions_with_fresh_var(&sig);
        debug!("late-bound lifetimes from method instantiated, method_sig={:?}",
               method_sig);

        let method_sig = method_sig.subst(self.tcx, all_substs);
        debug!("type scheme substituted, method_sig={:?}", method_sig);

        (method_sig, method_predicates)
    }
// NOTE: this returns the *unnormalized* predicates and method sig. Because of
// inference guessing, the predicates and method signature can't be normalized
// until we unify the `Self` type.
this returns the *unnormalized* predicates and method sig. Because of
inference guessing, the predicates and method signature can't be normalized
until we unify the `Self` type.
this returns the * unnormalized * predicates and method sig . Because of inference guessing the predicates and method signature can ' t be normalized until we unify the ` Self ` type .
fn instantiate_method_sig(&mut self,
                              pick: &probe::Pick<'tcx>,
                              all_substs: &'tcx Substs<'tcx>)
                              -> (ty::FnSig<'tcx>, ty::InstantiatedPredicates<'tcx>) {
        debug!("instantiate_method_sig(pick={:?}, all_substs={:?})",
               pick,
               all_substs);
        // Instantiate the bounds on the method with the
        // type/early-bound-regions substitutions performed. There can
        // be no late-bound regions appearing here.
        let def_id = pick.item.def_id;
        let method_predicates = self.tcx.predicates_of(def_id)
                                    .instantiate(self.tcx, all_substs);
        debug!("method_predicates after subst = {:?}", method_predicates);
        let sig = self.tcx.fn_sig(def_id);
        // Instantiate late-bound regions and substitute the trait
        // parameters into the method type to get the actual method type.
        //
        // NB: Instantiate late-bound regions first so that
        // `instantiate_type_scheme` can normalize associated types that
        // may reference those regions.
        let method_sig = self.replace_late_bound_regions_with_fresh_var(&sig);
        debug!("late-bound lifetimes from method instantiated, method_sig={:?}",
               method_sig);
        let method_sig = method_sig.subst(self.tcx, all_substs);
        debug!("type scheme substituted, method_sig={:?}", method_sig);
        (method_sig, method_predicates)
    }
fn instantiate_method_sig ( & mut self , pick : & probe :: Pick < ' tcx > , all_substs : & ' tcx Substs < ' tcx > ) -> ( ty :: FnSig < ' tcx > , ty :: InstantiatedPredicates < ' tcx > ) { debug ! ( " " pick all_substs ) ; // Instantiate the bounds on the method with the // type/early-bound-regions substitutions performed. There can // be no late-bound regions appearing here. let def_id = pick . item . def_id ; let method_predicates = self . tcx . predicates_of ( def_id ) . instantiate ( self . tcx , all_substs ) ; debug ! ( " " method_predicates ) ; let sig = self . tcx . fn_sig ( def_id ) ; // Instantiate late-bound regions and substitute the trait // parameters into the method type to get the actual method type. // // NB: Instantiate late-bound regions first so that // `instantiate_type_scheme` can normalize associated types that // may reference those regions. let method_sig = self . replace_late_bound_regions_with_fresh_var ( & sig ) ; debug ! ( " " method_sig ) ; let method_sig = method_sig . subst ( self . tcx , all_substs ) ; debug ! ( " " method_sig ) ; ( method_sig , method_predicates ) }
NOTE: this returns the *unnormalized* predicates and method sig.
NOTE : this returns the * unnormalized * predicates and method sig .
&mut self
pick
&probe::Pick<'tcx>
all_substs
&'tcx Substs<'tcx>
&mut self
pick
&probe::Pick<'tcx>
all_substs
&'tcx Substs<'tcx>