pub struct DnfExpr { /* private fields */ }
Expand description
A #[cfg]
directive in Disjunctive Normal Form (DNF).
Implementations§
source§impl DnfExpr
impl DnfExpr
pub fn new(expr: CfgExpr) -> Self
sourcepub fn why_inactive(&self, opts: &CfgOptions) -> Option<InactiveReason>
pub fn why_inactive(&self, opts: &CfgOptions) -> Option<InactiveReason>
Computes a list of present or absent atoms in opts
that cause this expression to evaluate
to false
.
Note that flipping a subset of these atoms might be sufficient to make the whole expression
evaluate to true
. For that, see compute_enable_hints
.
Returns None
when self
is already true, or contains errors.
sourcepub fn compute_enable_hints<'a>(
&'a self,
opts: &'a CfgOptions
) -> impl Iterator<Item = CfgDiff> + 'a
pub fn compute_enable_hints<'a>(
&'a self,
opts: &'a CfgOptions
) -> impl Iterator<Item = CfgDiff> + 'a
Returns CfgDiff
objects that would enable this directive if applied to opts
.