about summary refs log tree commit diff
path: root/compiler/rustc_mir/src/transform/coverage/mod.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2021-08-20 11:00:55 +0000
committerbors <bors@rust-lang.org>2021-08-20 11:00:55 +0000
commit521734787ecf80ff12df7ca5998f7ec0b3b7b2c9 (patch)
tree14d6353b5d2990f5572b35cfbf0c13422f0fd6f0 /compiler/rustc_mir/src/transform/coverage/mod.rs
parent9ccf661694423895b02e513c69e6ad263b2f3d8e (diff)
parentb4dfa198bf4879bc159c7119bd4188ccd625f71d (diff)
downloadrust-521734787ecf80ff12df7ca5998f7ec0b3b7b2c9.tar.gz
rust-521734787ecf80ff12df7ca5998f7ec0b3b7b2c9.zip
Auto merge of #87329 - sunfishcode:sunfishcode/io-safety, r=joshtriplett
I/O safety.

Introduce `OwnedFd` and `BorrowedFd`, and the `AsFd` trait, and
implementations of `AsFd`, `From<OwnedFd>` and `From<T> for OwnedFd`
for relevant types, along with Windows counterparts for handles and
sockets.

Tracking issue: <https://github.com/rust-lang/rust/issues/87074>

RFC: <https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md>

Highlights:
 - The doc comments at the top of library/std/src/os/unix/io/mod.rs and library/std/src/os/windows/io/mod.rs
 - The new types and traits in library/std/src/os/unix/io/fd.rs and library/std/src/os/windows/io/handle.rs
 - The removal of the `RawHandle` struct the Windows impl, which had the same name as the `RawHandle` type alias, and its functionality is now folded into `Handle`.

Managing five levels of wrapping (File wraps sys::fs::File wraps sys::fs::FileDesc wraps OwnedFd wraps RawFd, etc.) made for a fair amount of churn and verbose as/into/from sequences in some places. I've managed to simplify some of them, but I'm open to ideas here.

r? `@joshtriplett`
Diffstat (limited to 'compiler/rustc_mir/src/transform/coverage/mod.rs')
0 files changed, 0 insertions, 0 deletions