Skip to main content

resolve_impl

Function resolve_impl 

Source
pub fn resolve_impl(
    trait_ref: &TraitRef,
    ty: &Type,
    impls: &ImplTable,
) -> Option<ImplId>
Expand description

Find the impl block that satisfies trait_ref for ty in impls.

Performs an exact-type lookup: the type key derived from ty must match the key stored when the impl was registered. Returns None if no impl exists for the (trait, type) pair.

To verify that supertrait obligations are also satisfied, call check_supertrait_obligations on the result.