diff options
| author | Zalathar <Zalathar@users.noreply.github.com> | 2024-06-12 22:48:11 +1000 |
|---|---|---|
| committer | Zalathar <Zalathar@users.noreply.github.com> | 2024-06-12 22:48:11 +1000 |
| commit | 0bfdb8d33dd89099fc2b573d3df4c2347ffa2dbb (patch) | |
| tree | 1f53fe6abc3b161f559c1d63cc889d1bc6ab6b7f /tests/coverage/loop-break.rs | |
| parent | dc6def3042074f38e7c6bdaba3038fb2b1f0e2aa (diff) | |
| download | rust-0bfdb8d33dd89099fc2b573d3df4c2347ffa2dbb.tar.gz rust-0bfdb8d33dd89099fc2b573d3df4c2347ffa2dbb.zip | |
coverage: Add `tests/coverage/loop-break.rs`
This is a modified copy of `tests/mir-opt/coverage/instrument_coverage.rs`.
Diffstat (limited to 'tests/coverage/loop-break.rs')
| -rw-r--r-- | tests/coverage/loop-break.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tests/coverage/loop-break.rs b/tests/coverage/loop-break.rs new file mode 100644 index 00000000000..9a842225e83 --- /dev/null +++ b/tests/coverage/loop-break.rs @@ -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! |
