//! > Test loop.

//! > test_runner_name
test_function_lowering(expect_diagnostics: false)

//! > function_code
fn foo() -> bool {
    loop {
        // Some statements to prevent the loop function from being inlined.
        let mut x = 0;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        break true;
    }
}

//! > function_name
foo

//! > semantic_diagnostics

//! > lowering_diagnostics

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
  (v0: ()) <- struct_construct()
  (v1: core::bool) <- bool::True(v0)
End:
  Return(v1)

//! > ==========================================================================

//! > Test loop with break; only.

//! > test_runner_name
test_function_lowering(expect_diagnostics: false)

//! > function_code
fn foo() {
    loop {
        // Some statements to prevent the loop function from being inlined.
        let mut x = 0;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        x += 1;
        break;
    };
}

//! > function_name
foo

//! > semantic_diagnostics

//! > lowering_diagnostics

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
End:
  Return()
