diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:11:38 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-17 12:13:23 +0000 |
commit | 20431706a863f92cb37dc512fef6e48d192aaf2c (patch) | |
tree | 2867f13f5fd5437ba628c67d7f87309ccadcd286 /vendor/thiserror-impl/src/expand.rs | |
parent | Releasing progress-linux version 1.65.0+dfsg1-2~progress7.99u1. (diff) | |
download | rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.tar.xz rustc-20431706a863f92cb37dc512fef6e48d192aaf2c.zip |
Merging upstream version 1.66.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'vendor/thiserror-impl/src/expand.rs')
-rw-r--r-- | vendor/thiserror-impl/src/expand.rs | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/vendor/thiserror-impl/src/expand.rs b/vendor/thiserror-impl/src/expand.rs index f2f7116f2..43522096a 100644 --- a/vendor/thiserror-impl/src/expand.rs +++ b/vendor/thiserror-impl/src/expand.rs @@ -67,12 +67,12 @@ fn impl_struct(input: Struct) -> TokenStream { let source_provide = if type_is_option(source_field.ty) { quote_spanned! {source.span()=> if let std::option::Option::Some(source) = &self.#source { - source.as_dyn_error().provide(#demand); + source.thiserror_provide(#demand); } } } else { quote_spanned! {source.span()=> - self.#source.as_dyn_error().provide(#demand); + self.#source.thiserror_provide(#demand); } }; let self_provide = if source == backtrace { @@ -89,7 +89,7 @@ fn impl_struct(input: Struct) -> TokenStream { }) }; quote! { - use thiserror::__private::AsDynError; + use thiserror::__private::ThiserrorProvide; #source_provide #self_provide } @@ -259,12 +259,12 @@ fn impl_enum(input: Enum) -> TokenStream { let source_provide = if type_is_option(source_field.ty) { quote_spanned! {source.span()=> if let std::option::Option::Some(source) = #varsource { - source.as_dyn_error().provide(#demand); + source.thiserror_provide(#demand); } } } else { quote_spanned! {source.span()=> - #varsource.as_dyn_error().provide(#demand); + #varsource.thiserror_provide(#demand); } }; let self_provide = if type_is_option(backtrace_field.ty) { @@ -284,7 +284,7 @@ fn impl_enum(input: Enum) -> TokenStream { #source: #varsource, .. } => { - use thiserror::__private::AsDynError; + use thiserror::__private::ThiserrorProvide; #source_provide #self_provide } @@ -298,17 +298,17 @@ fn impl_enum(input: Enum) -> TokenStream { let source_provide = if type_is_option(source_field.ty) { quote_spanned! {backtrace.span()=> if let std::option::Option::Some(source) = #varsource { - source.as_dyn_error().provide(#demand); + source.thiserror_provide(#demand); } } } else { quote_spanned! {backtrace.span()=> - #varsource.as_dyn_error().provide(#demand); + #varsource.thiserror_provide(#demand); } }; quote! { #ty::#ident {#backtrace: #varsource, ..} => { - use thiserror::__private::AsDynError; + use thiserror::__private::ThiserrorProvide; #source_provide } } |