rust/library/std/src/os/windows
Dan Gohman 35606490ab Use HandleOrNull and HandleOrInvalid in the Windows FFI bindings.
Use the new `HandleOrNull` and `HandleOrInvalid` types that were introduced
as part of [I/O safety] in a few functions in the Windows FFI bindings.

This factors out an `unsafe` block and two `unsafe` function calls in the
Windows implementation code.

And, it helps test `HandleOrNull` and `HandleOrInvalid`, which indeed turned
up a bug: `OwnedHandle` also needs to be `#[repr(transparent)]`, as it's
used inside of `HandleOrNull` and `HandleOrInvalid` which are also
`#[repr(transparent)]`.

[I/O safety]: https://github.com/rust-lang/rust/issues/87074
2022-03-03 11:20:49 -08:00
..
io Use HandleOrNull and HandleOrInvalid in the Windows FFI bindings. 2022-03-03 11:20:49 -08:00
ffi.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
fs.rs Add a caveat to std::os::windows::fs::symlink_file 2021-11-20 12:28:43 -08:00
mod.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
process.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30
raw.rs Suppress some cfg from being shown in the stdlib docs 2021-10-05 18:15:29 +02:00
thread.rs modify std::os docs to be more consistent 2021-09-17 23:23:21 +05:30