fn assemble_candidates_from_caller_bounds(&mut self,
                                              obligation: &Obligation<'tcx>,
                                              candidates: &mut CandidateSet<'tcx>)
                                              -> Result<(),SelectionError<'tcx>>
    {
        debug!("assemble_candidates_from_caller_bounds({})",
               obligation.repr(self.tcx()));

        let caller_trait_refs: Vec<Rc<ty::TraitRef>> =
            self.param_env.caller_obligations.iter()
            .map(|o| o.trait_ref.clone())
            .collect();

        let all_bounds =
            util::transitive_bounds(
                self.tcx(), caller_trait_refs.as_slice());

        let matching_bounds =
            all_bounds.filter(
                |bound| self.infcx.probe(
                    || self.match_trait_refs(obligation,
                                             (*bound).clone())).is_ok());

        let param_candidates =
            matching_bounds.map(
                |bound| ParamCandidate(VtableParamData { bound: bound }));

        candidates.vec.extend(param_candidates);

        Ok(())
    }
/// Given an obligation like `<SomeTrait for T>`, search the obligations that the caller
/// supplied to find out whether it is listed among them.
///
/// Never affects inference environment.
Given an obligation like ``, search the obligations that the caller
supplied to find out whether it is listed among them.

Never affects inference environment.
Given an obligation like ` ` search the obligations that the caller supplied to find out whether it is listed among them . Never affects inference environment .
fn assemble_candidates_from_caller_bounds(&mut self,
                                              obligation: &Obligation<'tcx>,
                                              candidates: &mut CandidateSet<'tcx>)
                                              -> Result<(),SelectionError<'tcx>>
    {
        debug!("assemble_candidates_from_caller_bounds({})",
               obligation.repr(self.tcx()));
        let caller_trait_refs: Vec<Rc<ty::TraitRef>> =
            self.param_env.caller_obligations.iter()
            .map(|o| o.trait_ref.clone())
            .collect();
        let all_bounds =
            util::transitive_bounds(
                self.tcx(), caller_trait_refs.as_slice());
        let matching_bounds =
            all_bounds.filter(
                |bound| self.infcx.probe(
                    || self.match_trait_refs(obligation,
                                             (*bound).clone())).is_ok());
        let param_candidates =
            matching_bounds.map(
                |bound| ParamCandidate(VtableParamData { bound: bound }));
        candidates.vec.extend(param_candidates);
        Ok(())
    }
fn assemble_candidates_from_caller_bounds ( & mut self , obligation : & Obligation < ' tcx > , candidates : & mut CandidateSet < ' tcx > ) -> Result < ( ) , SelectionError < ' tcx > > { debug ! ( " " obligation repr ( self tcx ( ) ) ) ; let caller_trait_refs : Vec < Rc < ty :: TraitRef > > = self . param_env . caller_obligations . iter ( ) . map ( | o | o . trait_ref . clone ( ) ) . collect ( ) ; let all_bounds = util :: transitive_bounds ( self . tcx ( ) , caller_trait_refs . as_slice ( ) ) ; let matching_bounds = all_bounds . filter ( | bound | self . infcx . probe ( | | self . match_trait_refs ( obligation , ( * bound ) . clone ( ) ) ) . is_ok ( ) ) ; let param_candidates = matching_bounds . map ( | bound | ParamCandidate ( VtableParamData { bound : bound } ) ) ; candidates . vec . extend ( param_candidates ) ; Ok ( ( ) ) }
Given an obligation like `<SomeTrait for T>`, search the obligations that the caller
supplied to find out whether it is listed among them.
Given an obligation like ` <SomeTrait for T > ` search the obligations that the caller supplied to find out whether it is listed among them .
&mut self
obligation
&Obligation<'tcx>
candidates
&mut CandidateSet<'tcx>