Skip to main content

pattern_matches

Function pattern_matches 

Source
pub fn pattern_matches(
    catalog_pat: &TypePattern,
    concrete_pat: &TypePattern,
) -> bool
Expand description

Whether a catalog receiver pattern accepts a concrete runtime pattern.

Var("T") in the catalog entry is a type-variable wildcard: it matches any concrete element (so Vec[T].len() matches Vec[Int].len()). A TypePattern::Iterable receiver matches any of the ten PIPELINE_RECEIVERS. All other variants require exact equality.

This lives here because two callers ask the same question. praxis_hir::catalog::lookup decides dispatch and praxis_lsp::completion::dot_items decides what set. offers. If the two disagree the editor offers a method the compiler refuses; one function is what makes that unrepresentable rather than merely unlikely.