Skip to main content

prefilter_with_literals

Function prefilter_with_literals 

Source
fn prefilter_with_literals(hir: &Hir) -> Option<(Prefilter, Vec<Literal>)>
Expand description

Attempt to extract a prefilter from an HIR expression.

We do a little massaging here to do our best that the prefilter we get out of this is probably fast. Basically, the false positive rate has a much higher impact for things like the reverse inner optimization because more work needs to potentially be done for each candidate match.

Note that this assumes leftmost-first match semantics, so callers must not call this otherwise.