mirror of
https://github.com/rust-lang/rust.git
synced 2025-12-30 08:15:31 +00:00
Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`. Define `NullHandleError` and `InvalidHandleError` types, that implement std::error::Error, and use them as the error types in `HandleOrNull` and `HandleOrInvalid`, This addresses [this concern](https://github.com/rust-lang/rust/issues/87074#issuecomment-1080031167). This is the same as #95387. r? `@joshtriplett`