Skip to main content

resolve_type_relative_delegations

Function resolve_type_relative_delegations 

Source
pub(crate) fn resolve_type_relative_delegations(
    tcx: TyCtxt<'_>,
    _: (),
) -> FxIndexMap<LocalDefId, TypeRelativeDelegationRes>
Expand description

Simple (hack or heuristic) resolution of some delegations to inherent impls while correct resolution through ProbeContext is not available during AST -> HIR lowering due to query cycles. Successful resolutions from this heuristics are not a subset of successful resolutions from the correct approach, if we want to stabilize delegations to inherent impls with this approach we need a second pass in type checking (i.e., when there’s no cycles) that makes sure that resolutions from the heuristic match the correct resolutions, or report errors otherwise. FIXME(fn_delegation): correct resolution through ProbeContext engine