diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -39,7 +39,7 @@ use syn_utils::TypeOrPath; use crate::parse_assoc_type::parse_assoc_type; use crate::parse_assoc_type::AssocTypeError; use crate::parse_trait_sig::parse_trait_signature; -use crate::parse_trait_sig::MethodParseError; +use crate::parse_trait_sig::MethodError; use crate::parse_trait_sig::SignatureChanges; use crate::parse_trait_sig::TypeTransform; use crate::syn_utils::iter_path; @@ -94,14 +94,14 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { if let TraitItem::Method(method) = item { let mut signature = method.sig.clone(); match parse_trait_signature(&mut signature, &type_converter) { - Err((_, MethodParseError::NonDispatchableMethod)) => continue, - Err((span, MethodParseError::UnconvertibleAssocType)) => { + Err((_, MethodError::NonDispatchableMethod)) => continue, + Err((span, MethodError::UnconvertibleAssocType)) => { return abort!( span, "associated type is either undefined or doesn't have a trait bound" ) } - Err((span, MethodParseError::AssocTypeInInputs)) => { + Err((span, MethodError::AssocTypeInInputs)) => { return abort!( span, "dynamize does not support associated types in parameter types" @@ -109,15 +109,15 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { } Err(( span, - MethodParseError::AssocTypeInUnsupportedReturnType - | MethodParseError::UnconvertibleAssocTypeInFnInput, + MethodError::AssocTypeInUnsupportedReturnType + | MethodError::UnconvertibleAssocTypeInFnInput, )) => return abort!(span, "dynamize does not know how to convert this type"), Err(( span, - MethodParseError::UnconvertibleAssocTypeInTraitBound - | MethodParseError::UnconvertibleAssocTypeInWhereClause, + MethodError::UnconvertibleAssocTypeInTraitBound + | MethodError::UnconvertibleAssocTypeInWhereClause, )) => return abort!(span, "dynamize does not support associated types here"), - Err((span, MethodParseError::ImplTraitInInputs)) => { + Err((span, MethodError::ImplTraitInInputs)) => { return abort!( span, "dynamize does not support impl here, change it to a method generic" |