Function rustc_trait_selection::traits::codegen::drain_fulfillment_cx_or_panic[][src]

fn drain_fulfillment_cx_or_panic<T, 'tcx>(
    infcx: &InferCtxt<'_, 'tcx>,
    fulfill_cx: &mut FulfillmentContext<'tcx>,
    result: T
) -> T where
    T: TypeFoldable<'tcx>, 
Expand description

Finishes processes any obligations that remain in the fulfillment context, and then returns the result with all type variables removed and regions erased. Because this is intended for use after type-check has completed, if any errors occur, it will panic. It is 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.