Skip to content

Commit df349a9

Browse files
committed
Implement Sealed for ExitStatus only once.
With cfg(doc), both the windows and unix implementations were included, which conflicts. This moves the implementation to the file that defines the type.
1 parent 800d4f2 commit df349a9

File tree

3 files changed

+4
-6
lines changed

3 files changed

+4
-6
lines changed

library/std/src/process.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1375,6 +1375,10 @@ impl From<fs::File> for Stdio {
13751375
#[stable(feature = "process", since = "1.0.0")]
13761376
pub struct ExitStatus(imp::ExitStatus);
13771377

1378+
/// Allows extension traits within `std`.
1379+
#[unstable(feature = "sealed", issue = "none")]
1380+
impl crate::sealed::Sealed for ExitStatus {}
1381+
13781382
impl ExitStatus {
13791383
/// Was termination successful? Signal termination is not considered a
13801384
/// success, and success is defined as a zero exit status.

library/std/src/sys/unix/ext/process.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -203,9 +203,6 @@ pub trait ExitStatusExt: Sealed {
203203
fn into_raw(self) -> i32;
204204
}
205205

206-
#[unstable(feature = "sealed", issue = "none")]
207-
impl Sealed for process::ExitStatus {}
208-
209206
#[stable(feature = "rust1", since = "1.0.0")]
210207
impl ExitStatusExt for process::ExitStatus {
211208
fn from_raw(raw: i32) -> Self {

library/std/src/sys/windows/ext/process.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,6 @@ impl ExitStatusExt for process::ExitStatus {
9292
}
9393
}
9494

95-
#[unstable(feature = "sealed", issue = "none")]
96-
impl Sealed for process::ExitStatus {}
97-
9895
/// Windows-specific extensions to the [`process::Command`] builder.
9996
#[stable(feature = "windows_process_extensions", since = "1.16.0")]
10097
pub trait CommandExt {

0 commit comments

Comments
 (0)