Skip to content

Commit

Permalink
Rollup merge of #74291 - regexident:from-docs, r=GuillaumeGomez
Browse files Browse the repository at this point in the history
Added docs for `From<c_int>` for `ExitStatus`

Partially addresses #51430
  • Loading branch information
Manishearth authored Jul 15, 2020
2 parents 47f6a9d + 538f157 commit b7cf2cb
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/libstd/sys/unix/process/process_fuchsia.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@ impl ExitStatus {
}
}

/// Converts a raw `c_int` to a type-safe `ExitStatus` by wrapping it without copying.
impl From<c_int> for ExitStatus {
fn from(a: c_int) -> ExitStatus {
ExitStatus(a as i64)
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -479,6 +479,7 @@ impl ExitStatus {
}
}

/// Converts a raw `c_int` to a type-safe `ExitStatus` by wrapping it without copying.
impl From<c_int> for ExitStatus {
fn from(a: c_int) -> ExitStatus {
ExitStatus(a)
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys/vxworks/process/process_common.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,6 +376,7 @@ impl ExitStatus {
}
}

/// Converts a raw `c_int` to a type-safe `ExitStatus` by wrapping it without copying.
impl From<c_int> for ExitStatus {
fn from(a: c_int) -> ExitStatus {
ExitStatus(a)
Expand Down
1 change: 1 addition & 0 deletions src/libstd/sys/windows/process.rs
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,7 @@ impl ExitStatus {
}
}

/// Converts a raw `c::DWORD` to a type-safe `ExitStatus` by wrapping it without copying.
impl From<c::DWORD> for ExitStatus {
fn from(u: c::DWORD) -> ExitStatus {
ExitStatus(u)
Expand Down

0 comments on commit b7cf2cb

Please sign in to comment.