Releases: dtolnay/thiserror
Releases · dtolnay/thiserror
1.0.33
- Expose backtraces via the new "generic member access" API on the Error trait (rust-lang/rust#99301, rust-lang/rust#96024)
1.0.32
1.0.31
1.0.30
1.0.29
-
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;
1.0.28
1.0.27
1.0.26
1.0.25
1.0.24
- Hygiene fixes in generated
source
method of error types originating inside of a macro definition to unblock rust-lang/rust#80689 (comment) (#121, thanks @Aaron1011)