about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2022-03-03 11:07:23 -0800
committerDan Gohman <dev@sunfishcode.online>2022-03-03 11:20:49 -0800
commit35606490abf83f2bd6c4adddc3b3c13a2a8b783b (patch)
tree46637ce27c8e03ce767ef469c157add997a4fc09 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parent32cbc7630b2d6b7141e2588f91380c1a58cf0016 (diff)
downloadrust-35606490abf83f2bd6c4adddc3b3c13a2a8b783b.tar.gz
rust-35606490abf83f2bd6c4adddc3b3c13a2a8b783b.zip
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`, which indeed 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)]`.

[I/O safety]: https://github.com/rust-lang/rust/issues/87074
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions