rustc_trait_selection::infer::canonical::ir::relate

Function structurally_relate_tys

pub fn structurally_relate_tys<I, R>(
    relation: &mut R,
    a: <I as Interner>::Ty,
    b: <I as Interner>::Ty,
) -> Result<<I as Interner>::Ty, TypeError<I>>
where I: Interner, R: TypeRelation<I>,
Expand description

Relates a and b structurally, calling the relation for all nested values. Any semantic equality, e.g. of projections, and inference variables have to be handled by the caller.