rust/tests/ui/thir-print/thir-tree-loop-match.rs
bjorn3 ba5556d239
Add #[loop_match] for improved DFA codegen
Co-authored-by: Folkert de Vries <folkert@folkertdev.nl>
2025-06-23 20:43:04 +02:00

23 lines
434 B
Rust

//@ check-pass
//@ compile-flags: -Zunpretty=thir-tree
#![allow(incomplete_features)]
#![feature(loop_match)]
fn boolean(mut state: bool) -> bool {
#[loop_match]
loop {
state = 'blk: {
match state {
true => {
#[const_continue]
break 'blk false;
}
false => return state,
}
}
}
}
fn main() {}