rustc_trait_selection::traits

Function translate_args_with_cause

Source
pub fn translate_args_with_cause<'tcx>(
    infcx: &InferCtxt<'tcx>,
    param_env: ParamEnv<'tcx>,
    source_impl: DefId,
    source_args: GenericArgsRef<'tcx>,
    target_node: Node,
    cause: &ObligationCause<'tcx>,
) -> GenericArgsRef<'tcx>
Expand description

Like translate_args, but obligations from the parent implementation are registered with the provided ObligationCause.

This is for reporting region errors from those bounds. Type errors should not happen because the specialization graph already checks for those, and will result in an ICE.