about summary refs log tree commit diff
path: root/tests/debuginfo/enum-thinlto.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-03-14 15:44:31 +0100
committerGitHub <noreply@github.com>2024-03-14 15:44:31 +0100
commit280a1da2a0c3ddf7837f43df6748ea50f74849ea (patch)
treed557bc061f14fbb118ae658290af6a858bcb0fd3 /tests/debuginfo/enum-thinlto.rs
parentc2fbe404d21572a04dabc6a0e23eb3ab367832ad (diff)
parenta82587c1d44ac94fb95fb40989bcc2536fd13b9f (diff)
downloadrust-280a1da2a0c3ddf7837f43df6748ea50f74849ea.tar.gz
rust-280a1da2a0c3ddf7837f43df6748ea50f74849ea.zip
Rollup merge of #119029 - dylni:avoid-closing-invalid-handles, r=ChrisDenton
Avoid closing invalid handles

Documentation for [`HandleOrInvalid`] has this note:

> If holds a handle other than `INVALID_HANDLE_VALUE`, it will close the handle on drop.

Documentation for [`HandleOrNull`] has this note:

> If this holds a non-null handle, it will close the handle on drop.

Currently, both will call `CloseHandle` on their invalid handles as a result of using `OwnedHandle` internally, contradicting the above paragraphs. This PR adds destructors that match the documentation.

```@rustbot``` label A-io O-windows T-libs

[`HandleOrInvalid`]: https://doc.rust-lang.org/std/os/windows/io/struct.HandleOrInvalid.html
[`HandleOrNull`]: https://doc.rust-lang.org/std/os/windows/io/struct.HandleOrNull.html
Diffstat (limited to 'tests/debuginfo/enum-thinlto.rs')
0 files changed, 0 insertions, 0 deletions