about summary refs log tree commit diff
path: root/tests/ui/thir-print/thir-tree-loop-match.rs
blob: 8c5f2244d546550228b0f8471b5658567951772e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
//@ 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() {}