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

Bump thiserror from 1.0.64 to 2.0.1 #231

Closed
wants to merge 1 commit into from

Conversation

dependabot[bot]
Copy link
Contributor

@dependabot dependabot bot commented on behalf of github Nov 8, 2024

Bumps thiserror from 1.0.64 to 2.0.1.

Release notes

Sourced from thiserror's releases.

2.0.1

  • Support errors that contain a dynamically sized final field (#375)
  • Improve inference of trait bounds for fields that are interpolated multiple times in an error message (#377)

2.0.0

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

  • Support disabling thiserror's standard library dependency by disabling the default "std" Cargo feature: thiserror = { version = "2", default-features = false } (#373)

  • Support using r#source as field name to opt out of a field named "source" being treated as an error's Error::source() (#350)

    #[derive(Error, Debug)]

... (truncated)

Commits
  • 4066d53 Release 2.0.1
  • 8956be2 Merge pull request #380 from dtolnay/var
  • 16f8dc1 Wrap interpolated variables to forward Pointer correctly
  • 46586dd Add test that {:p} prints the right address
  • 5dfd2cc Merge pull request #379 from dtolnay/binding
  • fb59da6 Resolve let_and_return clippy lint
  • 3ee0a4d Emit rebinding only for interpolations that refer to a field
  • f4d5c2a Check infinite recursion as soon as Display bound is known
  • 8a77dea Parse trait bound before deciding name for local binding
  • 24e7f87 Clean up formatvar identifier construction
  • Additional commits viewable in compare view

Dependabot compatibility score

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


Dependabot commands and options

You can trigger Dependabot actions by commenting on this PR:

  • @dependabot rebase will rebase this PR
  • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
  • @dependabot merge will merge this PR after your CI passes on it
  • @dependabot squash and merge will squash and merge this PR after your CI passes on it
  • @dependabot cancel merge will cancel a previously requested merge and block automerging
  • @dependabot reopen will reopen this PR if it is closed
  • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
  • @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency
  • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
  • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)

Bumps [thiserror](https://github.com/dtolnay/thiserror) from 1.0.64 to 2.0.1.
- [Release notes](https://github.com/dtolnay/thiserror/releases)
- [Commits](dtolnay/thiserror@1.0.64...2.0.1)

---
updated-dependencies:
- dependency-name: thiserror
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
@dependabot dependabot bot added dependencies Pull requests that update a dependency file rust Pull requests that update Rust code labels Nov 8, 2024
Copy link

codecov bot commented Nov 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.70%. Comparing base (2ad3e1f) to head (f2ecc45).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #231   +/-   ##
=======================================
  Coverage   95.70%   95.70%           
=======================================
  Files         145      145           
  Lines        7201     7201           
=======================================
  Hits         6892     6892           
  Misses        309      309           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Contributor Author

dependabot bot commented on behalf of github Nov 11, 2024

Superseded by #232.

@dependabot dependabot bot closed this Nov 11, 2024
@dependabot dependabot bot deleted the dependabot/cargo/thiserror-2.0.1 branch November 11, 2024 23:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency file rust Pull requests that update Rust code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants