diff options
| author | Dylan DPC <99973273+Dylan-DPC@users.noreply.github.com> | 2022-03-04 02:06:42 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-03-04 02:06:42 +0100 |
| commit | 308efafc7782610dfa6eef5b8657a32d67afde5e (patch) | |
| tree | bfe563b54bac4252403d68d23b2b001139e41b35 /compiler/rustc_codegen_llvm/src | |
| parent | 958bd0268c307e91ec0fc93c8c4ed8a412008ab4 (diff) | |
| parent | 35606490abf83f2bd6c4adddc3b3c13a2a8b783b (diff) | |
| download | rust-308efafc7782610dfa6eef5b8657a32d67afde5e.tar.gz rust-308efafc7782610dfa6eef5b8657a32d67afde5e.zip | |
Rollup merge of #94572 - sunfishcode:sunfishcode/handle-or, r=joshtriplett
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`, and indeed, it 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)]`. r? ```@joshtriplett``` [I/O safety]: https://github.com/rust-lang/rust/issues/87074
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
0 files changed, 0 insertions, 0 deletions
