Skip to content

Commit 70ebedb

Browse files
committed
Move comment for Windows-only constant into the match arm section
1 parent 3bd708e commit 70ebedb

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

library/test/src/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
#![feature(process_exitcode_internals)]
2424
#![feature(panic_can_unwind)]
2525
#![feature(test)]
26+
#![feature(inline_const_pat)]
2627
#![allow(internal_features)]
2728

2829
// Public reexports

library/test/src/test_result.rs

+3-6
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ pub use self::TestResult::*;
1616
// it means.
1717
pub const TR_OK: i32 = 50;
1818

19-
// On Windows we use __fastfail to abort, which is documented to use this
20-
// exception code.
21-
#[cfg(windows)]
22-
const STATUS_ABORTED: i32 = 0xC0000409u32 as i32;
23-
2419
#[derive(Debug, Clone, PartialEq)]
2520
pub enum TestResult {
2621
TrOk,
@@ -95,8 +90,10 @@ pub fn get_result_from_exit_code(
9590
) -> TestResult {
9691
let result = match status.code() {
9792
Some(TR_OK) => TestResult::TrOk,
93+
// On Windows we use __fastfail to abort, which is documented to use this
94+
// exception code.
9895
#[cfg(windows)]
99-
Some(STATUS_ABORTED) => TestResult::TrFailed,
96+
Some(const {0xC0000409u32 as i32}) => TestResult::TrFailed,
10097
#[cfg(unix)]
10198
None => match status.signal() {
10299
Some(libc::SIGABRT) => TestResult::TrFailed,

0 commit comments

Comments
 (0)