diff --git a/Cargo.toml b/Cargo.toml index 8f203041..aefbdc61 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thiserror" -version = "1.0.63" +version = "1.0.64" authors = ["David Tolnay "] categories = ["rust-patterns"] description = "derive(Error)" @@ -14,7 +14,7 @@ rust-version = "1.56" # without the `std` feature (i.e. `no_std`): rust-version = "1.81" [dependencies] -thiserror-impl = { version = "=1.0.63", path = "impl" } +thiserror-impl = { version = "=1.0.64", path = "impl" } [dev-dependencies] anyhow = "1.0.73" diff --git a/impl/Cargo.toml b/impl/Cargo.toml index cafcd02a..4195d578 100644 --- a/impl/Cargo.toml +++ b/impl/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "thiserror-impl" -version = "1.0.63" +version = "1.0.64" authors = ["David Tolnay "] description = "Implementation detail of the `thiserror` crate" edition = "2021" diff --git a/impl/src/expand.rs b/impl/src/expand.rs index 0c67ad91..a90abc58 100644 --- a/impl/src/expand.rs +++ b/impl/src/expand.rs @@ -36,6 +36,7 @@ fn fallback(input: &DeriveInput, error: syn::Error) -> TokenStream { #error #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::thiserror::__private::error::Error for #ty #ty_generics #where_clause where // Work around trivial bounds being unstable. @@ -44,6 +45,7 @@ fn fallback(input: &DeriveInput, error: syn::Error) -> TokenStream { {} #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::core::fmt::Display for #ty #ty_generics #where_clause { fn fmt(&self, __formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { ::core::unreachable!() @@ -180,6 +182,7 @@ fn impl_struct(input: Struct) -> TokenStream { let display_where_clause = display_inferred_bounds.augment_where_clause(input.generics); quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::core::fmt::Display for #ty #ty_generics #display_where_clause { #[allow(clippy::used_underscore_binding)] fn fmt(&self, __formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { @@ -195,6 +198,7 @@ fn impl_struct(input: Struct) -> TokenStream { let body = from_initializer(from_field, backtrace_field); quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::core::convert::From<#from> for #ty #ty_generics #where_clause { #[allow(deprecated)] fn from(source: #from) -> Self { @@ -213,6 +217,7 @@ fn impl_struct(input: Struct) -> TokenStream { quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::thiserror::__private::error::Error for #ty #ty_generics #error_where_clause { #source_method #provide_method @@ -429,6 +434,7 @@ fn impl_enum(input: Enum) -> TokenStream { let display_where_clause = display_inferred_bounds.augment_where_clause(input.generics); Some(quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::core::fmt::Display for #ty #ty_generics #display_where_clause { fn fmt(&self, __formatter: &mut ::core::fmt::Formatter) -> ::core::fmt::Result { #use_as_display @@ -451,6 +457,7 @@ fn impl_enum(input: Enum) -> TokenStream { let body = from_initializer(from_field, backtrace_field); Some(quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::core::convert::From<#from> for #ty #ty_generics #where_clause { #[allow(deprecated)] fn from(source: #from) -> Self { @@ -469,6 +476,7 @@ fn impl_enum(input: Enum) -> TokenStream { quote! { #[allow(unused_qualifications)] + #[automatically_derived] impl #impl_generics ::thiserror::__private::error::Error for #ty #ty_generics #error_where_clause { #source_method #provide_method diff --git a/src/lib.rs b/src/lib.rs index 46b45d99..eb46547a 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -258,7 +258,7 @@ //! //! [`anyhow`]: https://github.com/dtolnay/anyhow -#![doc(html_root_url = "https://docs.rs/thiserror/1.0.63")] +#![doc(html_root_url = "https://docs.rs/thiserror/1.0.64")] #![allow( clippy::module_name_repetitions, clippy::needless_lifetimes,