diff --git a/lib/system/seqs_v2.nim b/lib/system/seqs_v2.nim index 4bebf4a827..9aa4e71b98 100644 --- a/lib/system/seqs_v2.nim +++ b/lib/system/seqs_v2.nim @@ -11,6 +11,11 @@ # import typetraits # strs already imported allocateds for us. + +# Some optimizations here may be not to empty-seq-initialize some symbols, then StrictNotNil complains. +{.push warning[StrictNotNil]: off.} # See https://github.com/nim-lang/Nim/issues/21401 + + proc supportsCopyMem(t: typedesc): bool {.magic: "TypeTrait".} ## Default seq implementation used by Nim's core. @@ -149,3 +154,6 @@ func capacity*[T](self: seq[T]): int {.inline.} = {.cast(noSideEffect).}: let sek = unsafeAddr self result = capacityImpl(cast[ptr NimSeqV2](sek)[]) + + +{.pop.} # See https://github.com/nim-lang/Nim/issues/21401