fn find_alias<'a, U>(
    unifier: &mut UnifierState<'a, U>,
    l: ArcType,
    r_id: &SymbolRef,
) -> Result<FoundAlias, ()>
where
    UnifierState<'a, U>: Unifier<State<'a>, ArcType>,
{
    let reduced_aliases = unifier.state.reduced_aliases.len();
    let result = find_alias_(unifier, l, r_id);
    match result {
        Ok(FoundAlias::Root(_)) | Ok(FoundAlias::Found(_)) => (),
        _ => {
            // Remove any alias reductions that were added if no new type is returned
            unifier.state.reduced_aliases.truncate(reduced_aliases);
        }
    }
    result
}
/// Attempt to unify two alias types.
/// To find a possible successful unification we walk through the alias expansions of `l` in an
/// attempt to find that `l` expands to the alias `r_id`
Attempt to unify two alias types.
Attempt to unify two alias types .
fn find_alias<'a, U>(
    unifier: &mut UnifierState<'a, U>,
    l: ArcType,
    r_id: &SymbolRef,
) -> Result<FoundAlias, ()>
where
    UnifierState<'a, U>: Unifier<State<'a>, ArcType>,
{
    let reduced_aliases = unifier.state.reduced_aliases.len();
    let result = find_alias_(unifier, l, r_id);
    match result {
        Ok(FoundAlias::Root(_)) | Ok(FoundAlias::Found(_)) => (),
        _ => {
            // Remove any alias reductions that were added if no new type is returned
            unifier.state.reduced_aliases.truncate(reduced_aliases);
        }
    }
    result
}
fn find_alias < ' a , U > ( unifier : & mut UnifierState < ' a , U > , l : ArcType , r_id : & SymbolRef , ) -> Result < FoundAlias , ( ) > where UnifierState < ' a , U > : Unifier < State < ' a > , ArcType > , { let reduced_aliases = unifier . state . reduced_aliases . len ( ) ; let result = find_alias_ ( unifier , l , r_id ) ; match result { Ok ( FoundAlias :: Root ( _ ) ) | Ok ( FoundAlias :: Found ( _ ) ) => ( ) , _ => { // Remove any alias reductions that were added if no new type is returned unifier . state . reduced_aliases . truncate ( reduced_aliases ) ; } } result }
Attempt to unify two alias types.
Attempt to unify two alias types .
unifier
&mut UnifierState<'a, U>
l
ArcType
r_id
&SymbolRef