[][src]Function cranelift_codegen_meta::cdsl::type_inference::substitute

fn substitute(
    map: &HashMap<&TypeVar, TypeVar>,
    external_type_var: &TypeVar
) -> TypeVar

Replaces an external type variable according to the following rules:

  • if a local copy is present in the map, return it.
  • or if it's derived, create a local derived one that recursively substitutes the parent.
  • or return itself.