1
Fork 0

coverage: Add tests/coverage/loop-break.rs

This is a modified copy of `tests/mir-opt/coverage/instrument_coverage.rs`.
This commit is contained in:
Zalathar 2024-06-12 22:48:11 +10:00
parent dc6def3042
commit 0bfdb8d33d
3 changed files with 41 additions and 0 deletions

View file

@ -0,0 +1,13 @@
//@ edition: 2021
fn main() {
loop {
if core::hint::black_box(true) {
break;
}
}
}
// This test is a lightly-modified version of `tests/mir-opt/coverage/instrument_coverage.rs`.
// If this test needs to be blessed, then the mir-opt version probably needs to
// be blessed too!