about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/counters.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-05-13 05:33:10 +0200
committerGitHub <noreply@github.com>2022-05-13 05:33:10 +0200
commitf38b7ff3b690a0720506250f421c5983d4f4f9ef (patch)
tree4d48950fc102d546ad8ffdd41648c525007bad2e /compiler/rustc_mir_transform/src/coverage/counters.rs
parentebb80ec4e90f8622440f3e33562db0d6e6c66555 (diff)
parent275812ad2cb0a5a9a8de88151438d1319a6f0704 (diff)
downloadrust-f38b7ff3b690a0720506250f421c5983d4f4f9ef.tar.gz
rust-f38b7ff3b690a0720506250f421c5983d4f4f9ef.zip
Rollup merge of #96932 - sunfishcode:sunfishcode/document-borrowed-handle, r=joshtriplett
Clarify what values `BorrowedHandle`, `OwnedHandle` etc. can hold.

Reword the documentation to clarify that when `BorrowedHandle`, `OwnedHandle`, or `HandleOrNull` hold the value `-1`, it always means the current process handle, and not `INVALID_HANDLE_VALUE`.

`-1` should only mean `INVALID_HANDLE_VALUE` after a call to a function documented to return that to report errors, which should lead I/O functions to produce errors rather than succeeding and producing `OwnedHandle` or `BorrowedHandle` values. So if a consumer of an `OwnedHandle` or `BorrowedHandle` ever sees them holding a `-1`, it should always mean the current process handle.
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/counters.rs')
0 files changed, 0 insertions, 0 deletions