diff options
| author | Dan Gohman <dev@sunfishcode.online> | 2022-05-10 21:42:30 -0700 |
|---|---|---|
| committer | Dan Gohman <dev@sunfishcode.online> | 2022-05-10 21:42:30 -0700 |
| commit | 2bb7fdb8e16788367ea4a3403ac405b8bc614cc6 (patch) | |
| tree | 1862df3d9c8a76466287cb5bea5149e83ea67843 | |
| parent | 4ce68c13bfbd88df8d93da676e8424544c27321e (diff) | |
| download | rust-2bb7fdb8e16788367ea4a3403ac405b8bc614cc6.tar.gz rust-2bb7fdb8e16788367ea4a3403ac405b8bc614cc6.zip | |
Also document that `as_raw_handle` may return NULL.
| -rw-r--r-- | library/std/src/os/windows/io/raw.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/library/std/src/os/windows/io/raw.rs b/library/std/src/os/windows/io/raw.rs index 68fa8918a56..49e4f304f5d 100644 --- a/library/std/src/os/windows/io/raw.rs +++ b/library/std/src/os/windows/io/raw.rs @@ -32,8 +32,15 @@ pub trait AsRawHandle { /// raw handle to the caller, and the handle is only guaranteed /// to be valid while the original object has not yet been destroyed. /// + /// This function may return null, such as when called on [`Stdin`], + /// [`Stdout`], or [`Stderr`] when the console is detached. + /// /// However, borrowing is not strictly required. See [`AsHandle::as_handle`] /// for an API which strictly borrows a handle. + /// + /// [`Stdin`]: io::Stdin + /// [`Stdout`]: io::Stdout + /// [`Stderr`]: io::Stderr #[stable(feature = "rust1", since = "1.0.0")] fn as_raw_handle(&self) -> RawHandle; } |
