diff options
| author | bors <bors@rust-lang.org> | 2020-12-20 16:36:23 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-12-20 16:36:23 +0000 |
| commit | b0e5c7d1fee37f1890455b977495bfe262716701 (patch) | |
| tree | c286f7b8a8386d4fbd14f7e8ef9c438a8990f797 /compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp | |
| parent | 2ad5292aea6328113b55968b4322528d48261316 (diff) | |
| parent | 094b1da3a1beb23b47e58aabe8d2c8ce74bb4f7f (diff) | |
| download | rust-b0e5c7d1fee37f1890455b977495bfe262716701.tar.gz rust-b0e5c7d1fee37f1890455b977495bfe262716701.zip | |
Auto merge of #74699 - notriddle:fd-non-negative, r=m-ou-se
Mark `-1` as an available niche for file descriptors Based on discussion from <https://internals.rust-lang.org/t/can-the-standard-library-shrink-option-file/12768>, the file descriptor `-1` is chosen based on the POSIX API designs that use it as a sentinel to report errors. A bigger niche could've been chosen, particularly on Linux, but would not necessarily be portable. This PR also adds a test case to ensure that the -1 niche (which is kind of hacky and has no obvious test case) works correctly. It requires the "upper" bound, which is actually -1, to be expressed in two's complement.
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/CoverageMappingWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
