document -d:nimStrictDelete [backport] (#18939)

This commit is contained in:
flywind 2021-10-03 13:22:53 +08:00 • committed by GitHub
commit 45c4332c81
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2142,6 +2142,10 @@ proc delete*[T](x: var seq[T], i: Natural) {.noSideEffect, auditDelete.} =
## ##
## This is an `O(n)` operation. ## This is an `O(n)` operation.
## ##
## .. note:: With `-d:nimStrictDelete`, an index error is produced when the index passed
## to it was out of bounds. `-d:nimStrictDelete` will become the default
## in upcoming versions.
##
## See also: ## See also:
## * `del <#del,seq[T],Natural>`_ for O(1) operation ## * `del <#del,seq[T],Natural>`_ for O(1) operation
## ##