Skip to main content

## eq_expr_value

# Function eq_expr_value

Source

    pub fn eq_expr_value(
        cx: &LateContext<'_>,
        ctxt: SyntaxContext,
        left: &Expr<'_>,
        right: &Expr<'_>,
    ) -> bool

Expand description

Checks if two expressions evaluate to the same value, and don’t contain any side effects.

The context argument is the context used to view the two expressions. e.g. when comparing the two arguments in `f(m!(1), m!(2))` the context of the call expression should be used. This is needed to handle the case where two macros expand to the same thing, but the arguments are different.