about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/debug.rs
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-05-11 07:17:52 -0700
committerDan Gohman <dev@sunfishcode.online>2022-05-11 07:26:49 -0700
commit90ff6fcd4ec4a91b9d0a4956d3fd8459931f2de4 (patch)
tree1658c667bcc8a8245c9d24d591cbc4c74e35fb11 /compiler/rustc_mir_transform/src/coverage/debug.rs
parentecd44958e0a21110d09862ee080d95a4ca6c52f8 (diff)
downloadrust-90ff6fcd4ec4a91b9d0a4956d3fd8459931f2de4.tar.gz
rust-90ff6fcd4ec4a91b9d0a4956d3fd8459931f2de4.zip
Add rustc_nonnull_optimization_guaranteed to Owned/Borrowed Fd/Socket
PR #94586 added support for using
`rustc_nonnull_optimization_guaranteed` on values where the "null" value
is the all-ones bitpattern.

Now that #94586 has made it to the stage0 compiler, add
`rustc_nonnull_optimization_guaranteed` to `OwnedFd`, `BorrowedFd`,
`OwnedSocket`, and `BorrowedSocket`, since these types all exclude
all-ones bitpatterns.

This allows `Option<OwnedFd>`, `Option<BorrowedFd>`, `Option<OwnedSocket>`,
and `Option<BorrowedSocket>` to be used in FFI declarations, as described
in the [I/O safety RFC].

[I/O safety RFC]: https://github.com/rust-lang/rfcs/blob/master/text/3128-io-safety.md#ownedfd-and-borrowedfdfd-1
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/debug.rs')
0 files changed, 0 insertions, 0 deletions