is_zero_integer_const

Function is_zero_integer_const 

Source
pub fn is_zero_integer_const(
    cx: &LateContext<'_>,
    expr: &Expr<'_>,
    ctxt: SyntaxContext,
) -> bool
Expand description

Check if expr evaluates to an integer constant of 0.

The context argument is the context used to view the evaluated expression. e.g. when evaluating the argument in f(m!(1)) the context of the call expression should be used. This is need so the const evaluator can see the m macro and marke the evaluation as non-local independant of what the macro expands to.