unary slices get a deprecation period (#18549)
This commit is contained in:
parent
b6f9f7a33e
commit
9c2442af94
2 changed files with 9 additions and 11 deletions
|
|
@ -63,8 +63,7 @@
|
||||||
- `hashes.hash(proc|ptr|ref|pointer)` now calls `hash(int)` and honors `-d:nimIntHash1`,
|
- `hashes.hash(proc|ptr|ref|pointer)` now calls `hash(int)` and honors `-d:nimIntHash1`,
|
||||||
`hashes.hash(closure)` has also been improved.
|
`hashes.hash(closure)` has also been improved.
|
||||||
|
|
||||||
- The unary slice `..b` was removed, use `0..b` instead or use `-d:nimLegacyUnarySlice`
|
- The unary slice `..b` was deprecated, use `0..b` instead.
|
||||||
for a deprecation period.
|
|
||||||
|
|
||||||
- Removed `.travis.yml`, `appveyor.yml.disabled`, `.github/workflows/ci.yml.disabled`.
|
- Removed `.travis.yml`, `appveyor.yml.disabled`, `.github/workflows/ci.yml.disabled`.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -511,7 +511,6 @@ proc `..`*[T, U](a: sink T, b: sink U): HSlice[T, U] {.noSideEffect, inline, mag
|
||||||
## echo a[2 .. 3] # @[30, 40]
|
## echo a[2 .. 3] # @[30, 40]
|
||||||
result = HSlice[T, U](a: a, b: b)
|
result = HSlice[T, U](a: a, b: b)
|
||||||
|
|
||||||
when defined(nimLegacyUnarySlice):
|
|
||||||
proc `..`*[T](b: sink T): HSlice[int, T]
|
proc `..`*[T](b: sink T): HSlice[int, T]
|
||||||
{.noSideEffect, inline, magic: "DotDot", deprecated: "replace `..b` with `0..b`".} =
|
{.noSideEffect, inline, magic: "DotDot", deprecated: "replace `..b` with `0..b`".} =
|
||||||
## Unary `slice`:idx: operator that constructs an interval `[default(int), b]`.
|
## Unary `slice`:idx: operator that constructs an interval `[default(int), b]`.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue