Function clippy_utils::consts::constant

source ยท
pub fn constant<'tcx>(
    lcx: &LateContext<'tcx>,
    typeck_results: &TypeckResults<'tcx>,
    e: &Expr<'_>,
) -> Option<Constant<'tcx>>
Expand description

Attempts to evaluate the expression as a constant.