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.