cairo_lang_semantic::items::imp

Function can_infer_impl_by_self

Source
pub fn can_infer_impl_by_self(
    ctx: &ComputationContext<'_>,
    inference_errors: &mut Vec<(TraitFunctionId, InferenceError)>,
    trait_function_id: TraitFunctionId,
    self_ty: TypeId,
    stable_ptr: SyntaxStablePtrId,
) -> bool
Expand description

Checks if an impl of a trait function with a given self_ty exists. This function does not change the state of the inference context.

inference_errors are aggregated here but are not reported here as diagnostics. The caller has to make sure the diagnostics are reported appropriately.