summary refs log tree commit diff
path: root/src/test/ui/consts/const-eval/issue-62272.rs
blob: ad8589c73788cfc8dc6b2f463fee69185eedaa0d (plain)
1
2
3
4
5
6
7
8
9
// run-pass

// Tests that `loop`s unconditionally-broken-from are allowed in constants.

const FOO: () = loop { break; };

fn main() {
    [FOO; { let x; loop { x = 5; break; } x }];
}