pub fn translate_substs_with_cause<'tcx>(
infcx: &InferCtxt<'tcx>,
param_env: ParamEnv<'tcx>,
source_impl: DefId,
source_substs: SubstsRef<'tcx>,
target_node: Node,
cause: impl Fn(usize, Span) -> ObligationCause<'tcx>
) -> SubstsRef<'tcx>Expand description
Like translate_substs, 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.