Skip to main content

is_const_param_evaluatable

Function is_const_param_evaluatable 

Source
pub fn is_const_param_evaluatable<'tcx>(
    tcx: TyCtxt<'tcx>,
    typeck: &'tcx TypeckResults<'tcx>,
    e: &'tcx Expr<'_>,
) -> bool
Expand description

Checks if the given expression can be used as a const parameter.

This is more strict than is_const_evaluatable as it requires that the expression does not contain any type parameters or any operations on const parameters.