pub(super) fn trivial<'a, 'lt, 'db, DB: HirDatabase>(
ctx: &'a TermSearchCtx<'db, DB>,
defs: &'a FxHashSet<ScopeDef>,
lookup: &'lt mut LookupTable<'db>,
) -> impl Iterator<Item = Expr<'db>> + use<'a, 'db, 'lt, DB>Expand description
§Trivial tactic
Attempts to fulfill the goal by trying items in scope Also works as a starting point to move all items in scope to lookup table.
§Arguments
ctx- Context for the term searchdefs- Set of items in scope at term search target locationlookup- Lookup table for types
Returns iterator that yields elements that unify with goal.
Note that there is no use of calling this tactic in every iteration as the output does not
depend on the current state of lookup