free_function

Function free_function 

Source
pub(super) fn free_function<'a, 'lt, 'db, DB: HirDatabase>(
    ctx: &'a TermSearchCtx<'db, DB>,
    defs: &'a FxHashSet<ScopeDef>,
    lookup: &'lt mut LookupTable<'db>,
    should_continue: &'a dyn Fn() -> bool,
) -> impl Iterator<Item = Expr<'db>> + use<'a, 'db, 'lt, DB>
Expand description

§Free function tactic

Attempts to call different functions in scope with parameters from lookup table. Functions that include generics are not used for performance reasons.

Updates lookup by new types reached and returns iterator that yields elements that unify with goal.

§Arguments

  • ctx - Context for the term search
  • defs - Set of items in scope at term search target location
  • lookup - Lookup table for types
  • should_continue - Function that indicates when to stop iterating