Skip to content
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

Merged
merged 11 commits into from
Apr 27, 2022

Commits on Apr 18, 2022

  1. 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`.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    703a336 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    5b3023c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    67994b7 View commit details
    Browse the repository at this point in the history
  4. Split NotHandle into NullHandleError and InvalidHandleError.

    Also, make the display messages more specific, and remove the `Copy`
    implementation.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    f934043 View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    890125d View commit details
    Browse the repository at this point in the history
  6. Update the expected stderr for coerce-issue-49593-box-never.

    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.
    sunfishcode committed Apr 18, 2022
    Configuration menu
    Copy the full SHA
    b7ff103 View commit details
    Browse the repository at this point in the history

Commits on Apr 19, 2022

  1. Configuration menu
    Copy the full SHA
    19ef182 View commit details
    Browse the repository at this point in the history
  2. Add ignore-windows to a test.

    This test has an expected stderr containing text like this:
    
    ```
    help: the following other types implement trait `std::error::Error`:
                 ...
               and 43 others
    ```
    
    However, the number 43 is platform-specific; on Windows, there are two
    additional types, `InvalidHandleError` and `NullHandleError`, and the
    number of 45. So for now, disable this test on Windows.
    sunfishcode committed Apr 19, 2022
    Configuration menu
    Copy the full SHA
    ef9a68f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9d448e8 View commit details
    Browse the repository at this point in the history

Commits on Apr 26, 2022

  1. Configuration menu
    Copy the full SHA
    839cd04 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    531c937 View commit details
    Browse the repository at this point in the history