diff options
-rw-r--r-- | src/transform.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/transform.rs b/src/transform.rs index ddab158..8de4c96 100644 --- a/src/transform.rs +++ b/src/transform.rs @@ -138,10 +138,10 @@ impl TypeConverter<'_> { TransformError::ExpectedAtLeastNTypes(type_count), )); } - for i in type_count..args.len() { - if iter_type(args[i]).any(match_assoc_type) { + for ty in args.iter().skip(type_count) { + if iter_type(ty).any(match_assoc_type) { return Err(( - args[i].span(), + ty.span(), TransformError::AssocTypeAfterFirstNTypes( type_count, last_seg.ident.clone(), |