diff --git a/lib/pure/collections/sequtils.nim b/lib/pure/collections/sequtils.nim index 3dba087aa8..299349a05a 100644 --- a/lib/pure/collections/sequtils.nim +++ b/lib/pure/collections/sequtils.nim @@ -1092,7 +1092,7 @@ template mapIt*(s: typed, op: untyped): untyped = type OutType = typeof(( block: - var it{.inject.}: typeof(items(s), typeOfIter); + var it{.inject, used.}: typeof(items(s), typeOfIter); op), typeOfProc) when OutType is not (proc): # Here, we avoid to create closures in loops.