Skip to main content

detect_array_for_each

Function detect_array_for_each 

Source
pub(crate) fn detect_array_for_each<'tcx>(
    tcx: TyCtxt<'tcx>,
    def_id: DefId,
    expr: &Expr,
) -> Option<ContractPlace<'tcx>>
Expand description

Check if the given expression refers to a function parameter whose type is an array. If so, return a ContractPlace for that parameter to be used as the for_each container.