You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: deferred_for_loops.rs
    path of file: ./repos/ruff/crates/ruff_linter/src/checkers/ast/analyze
    
    the code of the file until where you have to start completion: use ruff_python_ast::Stmt;

use crate::checkers::ast::Checker;
use crate::codes::Rule;
use crate::rules::{flake8_bugbear, flake8_simplify, perflint, pyupgrade, refurb};

/// Run lint rules over all deferred for-loops in the [`SemanticModel`].
pub(crate) fn deferred_for_loops(checker: &mut Checker) {
    while !checker.analyze.for_loops.is_empty() {
        let for_loops = std::mem::take(&mut checker.analyze.for_loops);
        for snapshot in for_loops {
            checker.semantic.restore(snapshot);

            let Stmt::For(stmt_for) = checker.semantic.current_statement() else {
                unreachable!("Expected Stmt::For");
            };

            if checker.enabled(Rule::UnusedLoopControlVariable) {
                flake8_bugbear::rules::unused_loop_control_variable(checker, stmt_for);
            }
            if checker.enabled(Rule::IncorrectDictIterator) {
                perflint::rules::incorrect_dict_iterator(checker, stmt_for);
            }
            if checker.enabled(Rule::YieldInForLoop) {
                pyupgrade::rules::yield_in_for_loop(checker, stmt_for);
            }
            if checker.enabled(Rule::Unne
    
pub(crate) fn deferred_for_loops(checker: &mut Checker) {
    while !checker.analyze.for_loops.is_empty() {
        let for_loops = std::mem::take(&mut checker.analyze.for_loops);
        for snapshot in for_loops {
            checker.semantic.restore(snapshot);

            let Stmt::For(stmt_for) = checker.semantic.current_statement() else {
                unreachable!("Expected Stmt::For");
            };

            if checker.enabled(Rule::UnusedLoopControlVariable) {
                flake8_bugbear::rules::unused_loop_control_variable(checker, stmt_for);
            }
            if checker.enabled(Rule::IncorrectDictIterator) {
                perflint::rules::incorrect_dict_iterator(checker, stmt_for);
            }
            if checker.enabled(Rule::YieldInForLoop) {
                pyupgrade::rules::yield_in_for_loop(checker, stmt_for);
            }
            if checker.enabled(Rule::UnnecessaryEnumerate) {
                refurb::rules::unnecessary_enumerate(checker, stmt_for);
            }
            if checker.enabled(Rule::EnumerateForLoop) {
                flake8_simplify::rules::enumerate_for_loop(checker, stmt_for);
            }
        }
    }
}