- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
          Define a dedicated error type for HandleOrNull and HandleOrInvalid.
          #95387
        
          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.
  
  #95387
              Conversation
      
        
              This comment has been minimized.
        
        
      
    
  This comment has been minimized.
Introduce the `InvalidHandleError` and `NullHandleError` error types, corresponding to rust-lang/rust#95387.
| @bors r+ | 
| 📌 Commit 733ef08 has been approved by  | 
…rror-type, r=joshtriplett Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`. Define a `NotHandle` type, that implements `std::error::Error`, and use it as the error type in `HandleOrNull` and `HandleOrInvalid`. This addresses [this concern](rust-lang#87074 (comment)). r? `@joshtriplett`
…rror-type, r=joshtriplett Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`. Define a `NotHandle` type, that implements `std::error::Error`, and use it as the error type in `HandleOrNull` and `HandleOrInvalid`. This addresses [this concern](rust-lang#87074 (comment)). r? ``@joshtriplett``
…rror-type, r=joshtriplett Define a dedicated error type for `HandleOrNull` and `HandleOrInvalid`. Define a `NotHandle` type, that implements `std::error::Error`, and use it as the error type in `HandleOrNull` and `HandleOrInvalid`. This addresses [this concern](rust-lang#87074 (comment)). r? ```@joshtriplett```
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.
733ef08    to
    e886145      
    Compare
  
    | The job  Click to see the possible cause of the failure (guessed by this bot) | 
| The rollup PR failed because of the diff -	           and 43 others
+	           and 45 othersI added a commit to fix this, but now this PR is failing with the diff -	           and 45 others
+	           and 43 othersFor now, I'll close this PR and wait until whatever other PR it's racing against settles in, and then re-open it. | 
| After rebasing this, github doesn't apparently allow me to reopen this PR, so I created a new one: #96195. | 
…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```
…or-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`
Introduce the `InvalidHandleError` and `NullHandleError` error types, corresponding to rust-lang/rust#95387.
Define a
NotHandletype, that implementsstd::error::Error, and useit as the error type in
HandleOrNullandHandleOrInvalid.This addresses this concern.
r? @joshtriplett