pub fn drain_fulfillment_cx<'a,'tcx,T>(infcx: &infer::InferCtxt<'a,'tcx>,
                                       fulfill_cx: &mut traits::FulfillmentContext<'tcx>,
                                       result: &T)
                                       -> StdResult<T,Vec<traits::FulfillmentError<'tcx>>>
    where T : TypeFoldable<'tcx>
{
    debug!("drain_fulfillment_cx(result={:?})",
           result);

    // In principle, we only need to do this so long as `result`
    // contains unbound type parameters. It could be a slight
    // optimization to stop iterating early.
    match fulfill_cx.select_all_or_error(infcx) {
        Ok(()) => { }
        Err(errors) => {
            return Err(errors);
        }
    }

    // Use freshen to simultaneously replace all type variables with
    // their bindings and replace all regions with 'static.  This is
    // sort of overkill because we do not expect there to be any
    // unbound type variables, hence no `TyFresh` types should ever be
    // inserted.
    Ok(result.fold_with(&mut infcx.freshener()))
}
/// Finishes processes any obligations that remain in the fulfillment
/// context, and then "freshens" and returns `result`. This is
/// primarily used during normalization and other cases where
/// processing the obligations in `fulfill_cx` may cause type
/// inference variables that appear in `result` to be unified, and
/// hence we need to process those obligations to get the complete
/// picture of the type.
Finishes processes any obligations that remain in the fulfillment
context, and then "freshens" and returns `result`. This is
primarily used during normalization and other cases where
processing the obligations in `fulfill_cx` may cause type
inference variables that appear in `result` to be unified, and
hence we need to process those obligations to get the complete
picture of the type.
Finishes processes any obligations that remain in the fulfillment context and then " freshens " and returns ` result ` . This is primarily used during normalization and other cases where processing the obligations in ` fulfill_cx ` may cause type inference variables that appear in ` result ` to be unified and hence we need to process those obligations to get the complete picture of the type .
pub fn drain_fulfillment_cx<'a,'tcx,T>(infcx: &infer::InferCtxt<'a,'tcx>,
                                       fulfill_cx: &mut traits::FulfillmentContext<'tcx>,
                                       result: &T)
                                       -> StdResult<T,Vec<traits::FulfillmentError<'tcx>>>
    where T : TypeFoldable<'tcx>
{
    debug!("drain_fulfillment_cx(result={:?})",
           result);
    // In principle, we only need to do this so long as `result`
    // contains unbound type parameters. It could be a slight
    // optimization to stop iterating early.
    match fulfill_cx.select_all_or_error(infcx) {
        Ok(()) => { }
        Err(errors) => {
            return Err(errors);
        }
    }
    // Use freshen to simultaneously replace all type variables with
    // their bindings and replace all regions with 'static.  This is
    // sort of overkill because we do not expect there to be any
    // unbound type variables, hence no `TyFresh` types should ever be
    // inserted.
    Ok(result.fold_with(&mut infcx.freshener()))
}
pub fn drain_fulfillment_cx < ' a , ' tcx , T > ( infcx : & infer :: InferCtxt < ' a , ' tcx > , fulfill_cx : & mut traits :: FulfillmentContext < ' tcx > , result : & T ) -> StdResult < T , Vec < traits :: FulfillmentError < ' tcx > > > where T : TypeFoldable < ' tcx > { debug ! ( " " result ) ; // In principle, we only need to do this so long as `result` // contains unbound type parameters. It could be a slight // optimization to stop iterating early. match fulfill_cx . select_all_or_error ( infcx ) { Ok ( ( ) ) => { } Err ( errors ) => { return Err ( errors ) ; } } // Use freshen to simultaneously replace all type variables with // their bindings and replace all regions with 'static.  This is // sort of overkill because we do not expect there to be any // unbound type variables, hence no `TyFresh` types should ever be // inserted. Ok ( result . fold_with ( & mut infcx . freshener ( ) ) ) }
Finishes processes any obligations that remain in the fulfillment
context, and then "freshens" and returns `result`.
Finishes processes any obligations that remain in the fulfillment context and then " freshens " and returns ` result ` .
infcx
&infer::InferCtxt<'a,'tcx>
fulfill_cx
&mut traits::FulfillmentContext<'tcx>
result
&T
infcx
&infer::InferCtxt<'a,'tcx>
fulfill_cx
&mut traits::FulfillmentContext<'tcx>
result
&T