crate fn should_suggest_const_in_array_repeat_expressions_attribute<'tcx>(
    ccx: &ConstCx<'_, 'tcx>,
    operand: &Operand<'tcx>,
) -> bool {
    let mut rpo = traversal::reverse_postorder(&ccx.body);
    let (temps, _) = collect_temps_and_candidates(&ccx, &mut rpo);
    let validator = Validator { ccx, temps: &temps, explicit: false };

    let should_promote = validator.validate_operand(operand).is_ok();
    let feature_flag = validator.ccx.tcx.features().const_in_array_repeat_expressions;
    debug!(
        "should_suggest_const_in_array_repeat_expressions_flag: def_id={:?} \
            should_promote={:?} feature_flag={:?}",
        validator.ccx.def_id(),
        should_promote,
        feature_flag
    );
    should_promote && !feature_flag
}
/// 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.
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.
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 .
crate fn should_suggest_const_in_array_repeat_expressions_attribute<'tcx>(
    ccx: &ConstCx<'_, 'tcx>,
    operand: &Operand<'tcx>,
) -> bool {
    let mut rpo = traversal::reverse_postorder(&ccx.body);
    let (temps, _) = collect_temps_and_candidates(&ccx, &mut rpo);
    let validator = Validator { ccx, temps: &temps, explicit: false };
    let should_promote = validator.validate_operand(operand).is_ok();
    let feature_flag = validator.ccx.tcx.features().const_in_array_repeat_expressions;
    debug!(
        "should_suggest_const_in_array_repeat_expressions_flag: def_id={:?} \
            should_promote={:?} feature_flag={:?}",
        validator.ccx.def_id(),
        should_promote,
        feature_flag
    );
    should_promote && !feature_flag
}
crate fn should_suggest_const_in_array_repeat_expressions_attribute < ' tcx > ( ccx : & ConstCx < ' _ , ' tcx > , operand : & Operand < ' tcx > , ) -> bool { let mut rpo = traversal :: reverse_postorder ( & ccx . body ) ; let ( temps , _ ) = collect_temps_and_candidates ( & ccx , & mut rpo ) ; let validator = Validator { ccx , temps : & temps , explicit : false } ; let should_promote = validator . validate_operand ( operand ) . is_ok ( ) ; let feature_flag = validator . ccx . tcx . features ( ) . const_in_array_repeat_expressions ; debug ! ( " \
 " validator ccx def_id ( ) should_promote feature_flag ) ; should_promote && ! feature_flag }
This function returns `true` if the `const_in_array_repeat_expressions` feature attribute should
be suggested.
This function returns ` true ` if the ` const_in_array_repeat_expressions ` feature attribute should be suggested .
ccx
&ConstCx<'_, 'tcx>
operand
&Operand<'tcx>
ccx
&ConstCx<'_, 'tcx>
operand
&Operand<'tcx>