Skip to content
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.

fix(deps): update rust crate thiserror to 1.0.59 - autoclosed #98

Closed
wants to merge 1 commit into from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented May 1, 2024

Mend Renovate

This PR contains the following updates:

Package Type Update Change
thiserror dependencies patch 1.0 -> 1.0.59

Release Notes

dtolnay/thiserror (thiserror)

v1.0.59

Compare Source

  • Unblock testing of rustc debug-fmt-detail option (#​297)

v1.0.58

Compare Source

  • Make backtrace support available when using -Dwarnings (#​292)

v1.0.57

Compare Source

  • Generate more efficient Display impl for error message which do not contain any interpolated value (#​286, thanks @​nyurik)

v1.0.56

Compare Source

  • Update proc-macro2 to fix caching issue when using a rustc-wrapper such as sccache

v1.0.55

Compare Source

  • Work around improperly cached build script result by sccache – second attempt (#​280)

v1.0.54

Compare Source

  • Work around improperly cached build script result by sccache – first attempt (#​279)

v1.0.53

Compare Source

  • Reduce spurious rebuilds under RustRover IDE when using a nightly toolchain (#​270)

v1.0.52

Compare Source

  • Fix interaction with RUSTC_BOOTSTRAP (#​269)

v1.0.51

Compare Source

  • Improve diagnostics when an invalid attribute previously caused thiserror to generate no Error impl (#​266)

v1.0.50

Compare Source

  • Improve diagnostic when a #[source], #[from], or #[transparant] attribute refers to a type that has no std::error::Error impl (#​258, thanks @​de-vri-es)

v1.0.49

Compare Source

v1.0.48

Compare Source

  • Improve implementation of displaying Path values in a generated Display impl (#​251, thanks @​mina86)

v1.0.47

Compare Source

v1.0.46

Compare Source

  • Add bootstrap workaround to allow rustc to depend on thiserror (#​248, thanks @​RalfJung)

v1.0.45

Compare Source

v1.0.44

Compare Source

  • Documentation improvements

v1.0.43

Compare Source

v1.0.42

Compare Source

  • Fix compile error in derived Display impl if there was a nonstandard write! macro in scope (#​239)

v1.0.41

Compare Source

v1.0.40

Compare Source

  • Update syn dependency to 2.x

v1.0.39

Compare Source

  • Set html_root_url attribute

v1.0.38

Compare Source

  • Documentation improvements

v1.0.37

Compare Source

  • Documentation improvements

v1.0.36

Compare Source

v1.0.35

Compare Source

  • More work on integrating std::any::Provider for backtrace support
  • Fix "Multiple applicable provide methods in scope" error when the caller has both std::error::Error and std::any::Provide traits in scope (#​185)

v1.0.34

Compare Source

  • Tweak "generic member access" based Backtrace implementation (#​184)

v1.0.33

Compare Source

v1.0.32

Compare Source

  • Add keywords to crates.io metadata

v1.0.31

Compare Source

  • Improve diagnostic when there is an enum variant containing #[from] #[backtrace] Error, Backtrace (#​163)

v1.0.30

Compare Source

  • Make #[source] attribute usable on a field of type Box<dyn Error + Send + Sync + UnwindSafe + 'static> (#​155, thanks @​cosmicexplorer)

v1.0.29

Compare Source

  • Support error types containing generic type parameters (#​148, #​149, #​150, #​151)

    use thiserror::Error;
    
    #[derive(Error, Debug)]
    pub enum MyError<E, F, G> {
        #[error("thing {0} ({0:?})")]
        Variant(E),
        #[error("some error")]
        Delegate(#[source] SomeError<F>),
        #[error("err 0o{val:o}")]
        Octal { val: G },
    }

    In the above example, thiserror would automatically generate the following pair of generic trait impls.

    impl<E, F, G> std::error::Error for MyError<E, F, G>
    where
        SomeError<F>: std::error::Error + 'static,
        Self: std::fmt::Debug + std::fmt::Display;
    
    impl<E, F, G> std::fmt::Display for MyError<E, F, G>
    where
        E: std::fmt::Debug + std::fmt::Display,
        G: std::fmt::Octal;

v1.0.28

Compare Source

  • Make ? work with error types that hold an optional source (#​147)

v1.0.27

Compare Source

v1.0.26

Compare Source

v1.0.25

Compare Source

  • Support error(transparent) on errors containing a non-'static inner error (#​113)

v1.0.24

Compare Source

v1.0.23

Compare Source

  • Better diagnostic when putting non-static lifetimes into the source type of an error (#​115, #​116)

v1.0.22

Compare Source

  • Fix raw identifier fields in format arguments (#​108, thanks @​ninevra)

    #[derive(Error, Debug)]
    #[error("raw identifier: {r#type}")]
    pub struct Error {
        r#type: i32,
    }
  • Fix Rust keyword named format arguments (#​109)

    #[derive(Error, Debug)]
    #[error("keyword: {type}", type = 1)]
    pub struct Error;

v1.0.21

Compare Source

  • Support capturing backtraces inside of Arc from a From impl, which makes it possible for errors having backtraces to be clonable (#​102)

    use std::backtrace::Backtrace;
    use std::sync::Arc;
    use thiserror::Error;
    
    #[derive(Error, Debug, Clone)]
    #[error("...")]
    pub struct ClonableErrorWithBacktrace {
        #[from]
        source: Inner,
        #[backtrace]
        backtrace: Arc<Backtrace>,
    }

v1.0.20

Compare Source

  • Resolve unused_qualifications lint in generated code (#​91)

v1.0.19

Compare Source

  • Avoid triggering used_underscore_binding pedantic Clippy lint in generated code of #[error(transparent)] attribute (#​88)

v1.0.18

Compare Source

  • Fix compiler error in some cases when derive(Error) is invoked from inside of a macro_rules macro (#​86)

v1.0.17

Compare Source

  • Documentation improvements

v1.0.16

Compare Source

  • Catch misplaced #[error(transparent)] attributes (#​80, #​81)

v1.0.15

Compare Source

  • Improve error message when an error type is missing a Display impl (#​75)

v1.0.14

Compare Source

  • Avoid triggering deprecation warnings when an error enum has deprecated variants

v1.0.13

Compare Source

  • Fix failure to compile Display impl if a format string contained more than 1 named interpolated variable and a trailing comma, as in #[error("{v1} {v2}",)]

v1.0.12

Compare Source

  • Produce a better error message if a #[source] or #[from] field contains a non-'static lifetime (#​68)

v1.0.11

Compare Source

  • Ship license files in thiserror-impl subcrate also (#​63)

v1.0.10

Compare Source

  • Improve parsing of .0 and .var-style format arguments (#​54)

    For example the one here as the argument to the match expression would now be recognized correctly:

    #[derive(Error, Debug)]
    pub enum MyError {
        #[error("{}: {0}", match .1 {
            Some(n) => format!("a variant error occurred with n={}", n),
            None => format!("there was an empty variant error"),
        })]
        Variant(String, Option<usize>),
    }

v1.0.9

Compare Source

  • Fix bug affecting display attributes of the form #[error("{}", some_expression)] (where the format string is "{}" and nothing else, and the value formatted is not just one of the fields from the error) #​53

v1.0.8

Compare Source

  • Documentation improvements

v1.0.7

Compare Source

  • Support mixing shorthand and non-shorthand format args (#​47)

    #[derive(Error, Debug)]
    pub enum Error {
        #[error("first letter must be lowercase but was {:?}", first_char(.0))]
        WrongCase(String),
        #[error("invalid index {idx}, expected at least {} and at most {}", .limits.lo, .limits.hi)]
        OutOfBounds { idx: usize, limits: Limits },
    }
  • Add #[error(transparent)] attribute for delegating Error impl to one field (#​50)

    This is useful for hiding error variants from a library's public error type:

    #[derive(Error, Debug)]
    #[error(transparent)]  // source and Display delegate to ErrorKind
    pub struct Error(ErrorKind);
    
    #[derive(Error, Debug)]
    /*private*/ enum ErrorKind {
        #[error("...")]
        E0,
        #[error("...")]
        E1(#[source] io::Error),
    }

    And also for enums that need an "anything else" variant; such variants tend not to have their own Display message but just forward through to the underlying error's Display and source:

    #[derive(Error, Debug)]
    pub enum MyError {
        ...
    
        #[error(transparent)]
        Other(#[from] anyhow::Error),  // source and Display delegate to anyhow::Error
    }

v1.0.6

Compare Source

v1.0.5

Compare Source

  • Support interpolating Path and PathBuf fields as if they had a Display impl

    use std::io;
    use std::path::PathBuf;
    use thiserror::Error;
    
    #[derive(Error, Debug)]
    pub enum Error {
        #[error("failed to load {1}")]
        Read(#[source] io::Error, PathBuf),
    }

    In previous releases this would fail to compile with:

    error[E0277]: `std::path::PathBuf` doesn't implement `std::fmt::Display`
     --> src/main.rs:7:13
      |
    7 |     #[error("failed to load {1}")]
      |             ^^^^^^^^^^^^^^^^^^^^ `std::path::PathBuf` cannot be formatted with the default formatter

v1.0.4

Compare Source

  • Avoid generated variable name collision with an enum member named formatter (#​36, thanks @​mathstuf)

v1.0.3

Compare Source

  • Fix #[error("{v0}")] where an interpolated identifier contains number digits (#​34)

v1.0.2

Compare Source

  • Add a #[from] attribute to request an implementation of std::convert::From from your error's source error types, making it easy to build your error via the ? operator.

    use thiserror::Error;
    
    #[derive(Error, Debug)]
    pub enum Error {
        Io(#[from] io::Error),
        Json(#[from] serde_json::Error),
        Regex(#[from] regex::Error),
        Other(#[from] anyhow::Error),
    }

    We only permit From to be derived from the error's source field, not any arbitrary other field. Notice that this allows #[from] to imply #[source] so you don't need to also specify #[source] explicitly.

    The variant must not contain any other fields beyond the source error and possibly a backtrace. A backtrace is captured from within the From impl if there is a field for it.

    #[derive(Error, Debug)]
    pub enum MyError {
        Io {
            #[from]
            source: io::Error,
            backtrace: Backtrace,
        },
    }
  • Named fields with the name source are assumed to be the error source and so no longer require an explicit #[source] attribute.

  • Enum variants now inherit the #[error(...)] attribute from atop the enum if there is one.

    use thiserror::Error;
    
    #[derive(Error, Debug)]
    #[error("{0}")] // applies to every variant without its own attr
    pub enum Error {
        Io(io::Error),
        Json(serde_json::Error),
        Regex(regex::Error),
        #[error("unknown error")]
        Unknown,
    }

v1.0.1

Compare Source

  • Documentation improvements

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 becomes conflicted, 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 has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot requested a review from a team as a code owner May 1, 2024 12:20
@renovate renovate bot requested review from tomhoule and removed request for a team May 1, 2024 12:20
@renovate renovate bot changed the title fix(deps): update rust crate thiserror to 1.0.59 fix(deps): update rust crate thiserror to 1.0.59 - autoclosed May 5, 2024
@renovate renovate bot closed this May 5, 2024
@renovate renovate bot deleted the renovate/thiserror-1.x branch May 5, 2024 10:06
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

0 participants