]>
git.proxmox.com Git - rustc.git/blob - tests/run-make/coverage/while_early_ret.rs
1 #![allow(unused_assignments)]
2 // expect-exit-status-1
4 fn main() -> Result
<(),u8> {
5 let mut countdown
= 10;
38 // ISSUE(77553): Originally, this test had `Err(1)` on line 22 (instead of `Ok(())`) and
39 // `std::process::exit(2)` on line 26 (instead of `Err(1)`); and this worked as expected on Linux
40 // and MacOS. But on Windows (MSVC, at least), the call to `std::process::exit()` exits the program
41 // without saving the InstrProf coverage counters. The use of `std::process:exit()` is not critical
42 // to the coverage test for early returns, but this is a limitation that should be fixed.