summaryrefslogtreecommitdiffstats
path: root/tests/run-coverage/while_early_ret.coverage
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-06-07 05:48:48 +0000
commitef24de24a82fe681581cc130f342363c47c0969a (patch)
tree0d494f7e1a38b95c92426f58fe6eaa877303a86c /tests/run-coverage/while_early_ret.coverage
parentReleasing progress-linux version 1.74.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-ef24de24a82fe681581cc130f342363c47c0969a.tar.xz
rustc-ef24de24a82fe681581cc130f342363c47c0969a.zip
Merging upstream version 1.75.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/run-coverage/while_early_ret.coverage')
-rw-r--r--tests/run-coverage/while_early_ret.coverage43
1 files changed, 0 insertions, 43 deletions
diff --git a/tests/run-coverage/while_early_ret.coverage b/tests/run-coverage/while_early_ret.coverage
deleted file mode 100644
index 49d39d366..000000000
--- a/tests/run-coverage/while_early_ret.coverage
+++ /dev/null
@@ -1,43 +0,0 @@
- LL| |#![allow(unused_assignments)]
- LL| |// failure-status: 1
- LL| |
- LL| 1|fn main() -> Result<(), u8> {
- LL| 1| let mut countdown = 10;
- LL| | while
- LL| 7| countdown
- LL| 7| >
- LL| 7| 0
- LL| | {
- LL| | if
- LL| 7| countdown
- LL| 7| <
- LL| 7| 5
- LL| | {
- LL| | return
- LL| | if
- LL| 1| countdown
- LL| 1| >
- LL| 1| 8
- LL| | {
- LL| 0| Ok(())
- LL| | }
- LL| | else
- LL| | {
- LL| 1| Err(1)
- LL| | }
- LL| | ;
- LL| 6| }
- LL| 6| countdown
- LL| 6| -=
- LL| 6| 1
- LL| | ;
- LL| | }
- LL| 0| Ok(())
- LL| 1|}
- LL| |
- LL| |// ISSUE(77553): Originally, this test had `Err(1)` on line 22 (instead of `Ok(())`) and
- LL| |// `std::process::exit(2)` on line 26 (instead of `Err(1)`); and this worked as expected on Linux
- LL| |// and MacOS. But on Windows (MSVC, at least), the call to `std::process::exit()` exits the program
- LL| |// without saving the InstrProf coverage counters. The use of `std::process:exit()` is not critical
- LL| |// to the coverage test for early returns, but this is a limitation that should be fixed.
-