8000 fix(deps): update rust crate thiserror to v2 by renovate[bot] · Pull Request #155 · humanwhocodes/momoa · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

fix(deps): update rust crate thiserror to v2 #155

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

Merged
merged 1 commit into from
Feb 21, 2025
Merged

Conversation

renovate[bot]
Copy link
Contributor
@renovate renovate bot commented Nov 6, 2024

This PR contains the following updates:

Package Type Update Change
thiserror dependencies major 1.0.57 -> 2.0.0

Release Notes

dtolnay/thiserror (thiserror)

v2.0.0

Compare Source

Breaking changes

  • Referencing keyword-named fields by a raw identifier like {r#type} inside a format string is no longer accepted; simply use the unraw name like {type} (#​347)

    This aligns thiserror with the standard library's formatting macros, which gained support for implicit argument capture later than the release of this feature in thiserror 1.x.

    #[derive(Error, Debug)]
    #[error("... {type} ...")]  // Before: {r#type}
    pub struct Error {
        pub r#type: Type,
    }
  • Trait bounds are no longer inferred on fields whose value is shadowed by an explicit named argument in a format message (#​345)

    // Before: impl<T: Octal> Display for Error<T>
    // After: impl<T> Display for Error<T>
    #[derive(Error, Debug)]
    #[error("{thing:o}", thing = "...")]
    pub struct Error<T> {
        thing: T,
    }
  • Tuple structs and tuple variants can no longer use numerical {0} {1} access at the same time as supplying extra positional arguments for a format message, as this makes it ambiguous whether the number refers to a tuple field vs a different positional arg (#​354)

    #[derive(Error, Debug)]
    #[error("ambiguous: {0} {}", $N)]
    //                  ^^^ Not allowed, use #[error("... {0} {n}", n = $N)]
    pub struct TupleError(i32);
  • Code containing invocations of thiserror's derive(Error) must now have a direct dependency on the thiserror crate regardless of the error data structure's contents (#​368, #​369, #​370, #​372)

Features


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@renovate renovate bot force-pushed the renovate/thiserror-2.x branch 4 times, most recently from dd6a713 to b9df8d7 Compare November 7, 2024 21:44
@renovate renovate bot force-pushed the renovate/thiserror-2.x branch 9 times, most recently from f41430c to ba82ea8 Compare December 6, 2024 01:23
@renovate renovate bot force-pushed the renovate/thiserror-2.x branch 4 times, most recently from 3dc97b3 to dad7e58 Compare January 7, 2025 23:46
@renovate renovate bot force-pushed the renovate/thiserror-2.x branch from dad7e58 to 2e3a13c Compare February 21, 2025 23:10
@nzakas nzakas merged commit 8ab4647 into main Feb 21, 2025
14 checks passed
@nzakas nzakas deleted the renovate/thiserror-2.x branch February 21, 2025 23:20
@github-actions github-actions bot mentioned this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant
0