about summary refs log tree commit diff
path: root/tests/ui/lint/break-with-label-and-unsafe-block.rs
blob: a76a57614755637683f7a48e7af17c1935f671d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
//@ check-pass

#![deny(break_with_label_and_loop)]

unsafe fn foo() -> i32 { 42 }

fn main () {
    'label: loop {
        break 'label unsafe { foo() }
    };
}