Skip to main content

hir_can_contain_literal

Function hir_can_contain_literal 

Source
pub(super) fn hir_can_contain_literal(hir: &Hir, lit: &[u8]) -> bool
Expand description

Return true when hir can match some string containing every byte in lit.

This is deliberately low precision. If every byte in a literal can be consumed somewhere in the HIR, this gives up and reports that the literal might occur internally. That is, this returning true does not necessarily mean that the Hir provided definitively matches lit.