rust/tests/ui/lint/break-with-label-and-unsafe-block.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
163 B
Rust
Raw Permalink Normal View History

//@ check-pass
#![deny(break_with_label_and_loop)]
unsafe fn foo() -> i32 { 42 }
fn main () {
'label: loop {
break 'label unsafe { foo() }
};
}