//! > Test loop.
//! > test_runner_name
test_function_lowering
//! > function
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
//! > module_code
//! > semantic_diagnostics
//! > lowering_diagnostics
//! > lowering_flat
Parameters:
blk0 (root):
Statements:
(v1: ()) <- struct_construct()
(v2: core::bool) <- bool::True(v1)
End:
Return(v2)
//! > ==========================================================================
//! > Test loop with break; only.
//! > test_runner_name
test_function_lowering
//! > function
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
//! > module_code
//! > semantic_diagnostics
//! > lowering_diagnostics
//! > lowering_flat
Parameters:
blk0 (root):
Statements:
End:
Return()