diff options
author | Martin Fischer <martin@push-f.com> | 2021-11-22 11:05:13 +0100 |
---|---|---|
committer | Martin Fischer <martin@push-f.com> | 2021-11-22 11:05:13 +0100 |
commit | 6b01f08fa1de6d67ab47ad19493ea683a75fc2ed (patch) | |
tree | 2edcd1e6cae887e7394dd95ea94666fbf62c0005 /src/lib.rs | |
parent | 8178b4671b03a9c7d4dbe6c4ce66b9cb737c4e2d (diff) |
rename MethodParseError to MethodError
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" |