diff options
Diffstat (limited to 'src/lib.rs')
-rw-r--r-- | src/lib.rs | 18 |
1 files changed, 7 insertions, 11 deletions
@@ -95,7 +95,7 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { let mut signature = method.sig.clone(); match parse_trait_signature(&mut signature, &type_converter) { Err((_, MethodError::NonDispatchableMethod)) => continue, - Err((span, MethodError::UnconvertibleAssocType)) => { + Err((span, MethodError::AssocTypeWithoutDestType)) => { return abort!( span, "associated type is either undefined or doesn't have a trait bound" @@ -107,16 +107,12 @@ pub fn dynamize(_attr: TokenStream, input: TokenStream) -> TokenStream { "dynamize does not support associated types in parameter types" ) } - Err(( - span, - MethodError::AssocTypeInUnsupportedReturnType - | MethodError::UnconvertibleAssocTypeInFnInput, - )) => return abort!(span, "dynamize does not know how to convert this type"), - Err(( - span, - MethodError::UnconvertibleAssocTypeInTraitBound - | MethodError::UnconvertibleAssocTypeInWhereClause, - )) => return abort!(span, "dynamize does not support associated types here"), + Err((span, MethodError::UnsupportedType)) => { + return abort!(span, "dynamize does not know how to convert this type") + } + Err((span, MethodError::UnconvertedAssocType)) => { + return abort!(span, "dynamize does not support associated types here") + } Err((span, MethodError::ImplTraitInInputs)) => { return abort!( span, |