[−][src]Function rustc_mir::transform::promote_consts::should_suggest_const_in_array_repeat_expressions_attribute

pub(crate) fn should_suggest_const_in_array_repeat_expressions_attribute<'tcx>(
    ccx: &ConstCx<'_, 'tcx>,
    operand: &Operand<'tcx>
) -> bool

This function returns true if the const_in_array_repeat_expressions feature attribute should be suggested. This function is probably quite expensive, it shouldn't be run in the happy path. Feature attribute should be suggested if operand can be promoted and the feature is not enabled.