diff --git a/impl/src/expand.rs b/impl/src/expand.rs index 4ce2c0b..1b44513 100644 --- a/impl/src/expand.rs +++ b/impl/src/expand.rs @@ -89,7 +89,7 @@ fn impl_struct(input: Struct) -> TokenStream { let source_method = source_body.map(|body| { quote! { fn source(&self) -> ::core::option::Option<&(dyn std::error::Error + 'static)> { - use thiserror::__private::AsDynError; + use thiserror::__private::AsDynError as _; #body } } @@ -125,7 +125,7 @@ fn impl_struct(input: Struct) -> TokenStream { }) }; quote! { - use thiserror::__private::ThiserrorProvide; + use thiserror::__private::ThiserrorProvide as _; #source_provide #self_provide } @@ -266,7 +266,7 @@ fn impl_enum(input: Enum) -> TokenStream { }); Some(quote! { fn source(&self) -> ::core::option::Option<&(dyn std::error::Error + 'static)> { - use thiserror::__private::AsDynError; + use thiserror::__private::AsDynError as _; #[allow(deprecated)] match self { #(#arms)* @@ -316,7 +316,7 @@ fn impl_enum(input: Enum) -> TokenStream { #source: #varsource, .. } => { - use thiserror::__private::ThiserrorProvide; + use thiserror::__private::ThiserrorProvide as _; #source_provide #self_provide } @@ -340,7 +340,7 @@ fn impl_enum(input: Enum) -> TokenStream { }; quote! { #ty::#ident {#backtrace: #varsource, ..} => { - use thiserror::__private::ThiserrorProvide; + use thiserror::__private::ThiserrorProvide as _; #source_provide } }