-
Notifications
You must be signed in to change notification settings - Fork 12.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Define a dedicated error type for HandleOrNull
and HandleOrInvalid
.
#96195
Define a dedicated error type for HandleOrNull
and HandleOrInvalid
.
#96195
Conversation
Define a `NotHandle` type, that implements `std::error::Error`, and use it as the error type in `HandleOrNull` and `HandleOrInvalid`.
Also, make the display messages more specific, and remove the `Copy` implementation.
This test's expected stderr now includes a count of the number of types that implment `Error`. This PR introduces two new types, so increment the number by two.
Hey! It looks like you've submitted a new PR for the library teams! If this PR contains changes to any Examples of
|
Following rust-highfive's instructions, since this PR changes an existing unstable library API: r? rust-lang/libs-api @rustbot label +T-libs-api -T-libs |
@bors r+ |
📌 Commit 19ef182 has been approved by |
…rror-type, r=joshtriplett 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](rust-lang#87074 (comment)). This is the same as rust-lang#95387. r? `@joshtriplett`
…rror-type, r=joshtriplett 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](rust-lang#87074 (comment)). This is the same as rust-lang#95387. r? ``@joshtriplett``
…rror-type, r=joshtriplett 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](rust-lang#87074 (comment)). This is the same as rust-lang#95387. r? ```@joshtriplett```
@joshtriplett I've now added a separate windows-only version of the test, to preserve the test coverage on Windows. How does that sound? |
I discussed this with @joshtriplett offline. |
@bors r=joshtriplett |
@sunfishcode: 🔑 Insufficient privileges: Not in reviewers |
@bors r+ |
📌 Commit 839cd04 has been approved by |
⌛ Testing commit 839cd04 with merge cc13d213371516dcfbc3ea2d4c0f8394f98c0ca1... |
💔 Test failed - checks-actions |
This comment has been minimized.
This comment has been minimized.
@bors r+ |
📌 Commit 531c937 has been approved by |
☀️ Test successful - checks-actions |
Finished benchmarking commit (bb85bca): comparison url. Summary: This benchmark run did not return any relevant results. If you disagree with this performance assessment, please file an issue in rust-lang/rustc-perf. @rustbot label: -perf-regression |
Define
NullHandleError
andInvalidHandleError
types, that implement std::error::Error, and use them as the error types inHandleOrNull
andHandleOrInvalid
,This addresses this concern.
This is the same as #95387.
r? @joshtriplett