diff options
author | Timothee Cour <timothee.cour2@gmail.com> | 2021-04-19 19:02:52 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-19 19:02:52 -0700 |
commit | ad67bcf379dbe5b7b17d85e28620749cd8bcf5e9 (patch) | |
tree | 354318bcac2683d81eb79a9d64a296a33e29dd33 /lib | |
parent | 3b80f0dc8ef2bc9d2a981a7c92a6355dfc72b7ef (diff) | |
download | Nim-ad67bcf379dbe5b7b17d85e28620749cd8bcf5e9.tar.gz |
fix https://github.com/nim-lang/RFCs/issues/311 remove unary slice (#16714)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/system.nim | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/lib/system.nim b/lib/system.nim index 7fd35781b..d73ef6dbe 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -510,14 +510,6 @@ proc `..`*[T, U](a: sink T, b: sink U): HSlice[T, U] {.noSideEffect, inline, mag ## echo a[2 .. 3] # @[30, 40] result = HSlice[T, U](a: a, b: b) -proc `..`*[T](b: sink T): HSlice[int, T] {.noSideEffect, inline, magic: "DotDot".} = - ## Unary `slice`:idx: operator that constructs an interval `[default(int), b]`. - ## - ## .. code-block:: Nim - ## let a = [10, 20, 30, 40, 50] - ## echo a[.. 2] # @[10, 20, 30] - result = HSlice[int, T](a: 0, b: b) - when defined(hotCodeReloading): {.pragma: hcrInline, inline.} else: |