rust/library/std/src/os
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
..
android Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
dragonfly Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
emscripten Remove an invalid #[doc(inline)] 2021-05-11 00:03:44 +02:00
espidf STD support for the ESP-IDF framework 2021-08-10 12:09:00 +03:00
fd Rollup merge of #93562 - sunfishcode:sunfishcode/io-docs, r=joshtriplett 2022-03-03 11:02:49 +01:00
fortanix_sgx Stabilize asm! and global_asm! 2021-12-12 11:20:03 +00:00
freebsd Auto merge of #74576 - myfreeweb:freebsd-sanitizers, r=oli-obk 2020-08-15 11:38:24 +00:00
fuchsia Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
haiku Deprecate std::os::haiku::raw 2021-03-16 17:43:33 -04:00
hermit Move OsStringExt and OsStrExt to std::os 2021-06-20 11:55:01 +02:00
illumos Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
ios Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
linux Compute most of Public/Exported access level in rustc_resolve 2022-01-09 21:33:14 +00:00
macos Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
netbsd Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
openbsd Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
raw Provide C FFI types via core::ffi, not just in std 2022-03-01 17:16:05 -08:00
redox Cleanup std::os 2021-05-03 16:56:20 +02:00
solaris Switch to intra-doc links in library/std/src/os/*/fs.rs 2020-08-11 15:20:01 +05:30
solid Add SOLID targets 2021-09-28 11:31:47 +09:00
unix Implement AsFd for &T and &mut T. 2022-02-10 18:26:12 -08:00
vxworks Take sys/vxworks/{fd,fs,io} from sys/unix instead. 2020-10-16 06:19:00 +02:00
wasi Hide Repr details from io::Error, and rework io::Error::new_const. 2022-02-04 18:47:29 -08:00
windows Use HandleOrNull and HandleOrInvalid in the Windows FFI bindings. 2022-03-03 11:20:49 -08:00
mod.rs Add SOLID targets 2021-09-28 11:31:47 +09:00