diff options
Diffstat (limited to 'src/parse_assoc_type.rs')
-rw-r--r-- | src/parse_assoc_type.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/parse_assoc_type.rs b/src/parse_assoc_type.rs index 7efc7da..85f3723 100644 --- a/src/parse_assoc_type.rs +++ b/src/parse_assoc_type.rs @@ -3,9 +3,9 @@ use quote::{quote, ToTokens}; use syn::spanned::Spanned; use syn::{GenericArgument, Ident, Path, PathArguments, PathSegment, TraitItemType, Type}; +use crate::match_assoc_type; use crate::parse_trait_sig::TypeTransform; -use crate::syn_utils::{find_in_type, lifetime_bounds, trait_bounds}; -use crate::AssocTypeMatcher; +use crate::syn_utils::{iter_type, lifetime_bounds, trait_bounds}; #[derive(Debug)] pub enum AssocTypeParseError { @@ -63,7 +63,7 @@ pub fn parse_assoc_type( if ident == "Into" && args.args.len() == 1 { if let GenericArgument::Type(into_type) = args.args.first().unwrap() { // provide a better error message for type A: Into<Self::B> - if find_in_type(into_type, &AssocTypeMatcher).is_some() { + if iter_type(into_type).any(match_assoc_type) { return Err((into_type.span(), AssocTypeParseError::AssocTypeInBound)); } |