about summary refs log tree commit diff
path: root/compiler/rustc_mir_transform/src/coverage/query.rs
diff options
context:
space:
mode:
authorJubilee <workingjubilee@gmail.com>2025-02-10 00:51:53 -0800
committerGitHub <noreply@github.com>2025-02-10 00:51:53 -0800
commitf471ce39fb92e9dd036a062ebaf3689d3c728577 (patch)
tree773940ac79400b20ddb4297103c5b055f4b84911 /compiler/rustc_mir_transform/src/coverage/query.rs
parente1bd25e97049959c8966366495449c608eaa2a5f (diff)
parentbd6a6777f5cbbec549f123995026cef76d1e6b84 (diff)
downloadrust-f471ce39fb92e9dd036a062ebaf3689d3c728577.tar.gz
rust-f471ce39fb92e9dd036a062ebaf3689d3c728577.zip
Rollup merge of #136552 - ChrisDenton:option-find-handle, r=Mark-Simulacrum
Use an `Option` for `FindNextFileHandle` in `ReadDir` instead of `INVALID_FILE_HANDLE` sentinel value

Sometimes we store an invalid handle when we don't want to return an error. We then check the handle before use in order to avoid actually using the invalid handle. However, using an `Option` for this is better and avoids us forgetting to check the handle is valid. This was noticed due to us closing the handle without checking for validity: https://github.com/rust-lang/rust/blob/bd6a6777f5cbbec549f123995026cef76d1e6b84/library/std/src/sys/pal/windows/fs.rs#L148-L151
Diffstat (limited to 'compiler/rustc_mir_transform/src/coverage/query.rs')
0 files changed, 0 insertions, 0 deletions