Render deprecated pragmas (#8886)
* Render deprecated pragmas * fix the expected html * clean up the documentation regarding deprecations * fix typo * fix system.nim * fix random
This commit is contained in:
parent
64518380a5
commit
7d217a71d3
21 changed files with 180 additions and 117 deletions
|
|
@ -176,12 +176,12 @@ proc `$`*[T](heap: HeapQueue[T]): string =
|
|||
result.addQuoted(x)
|
||||
result.add("]")
|
||||
|
||||
proc newHeapQueue*[T](): HeapQueue[T] {.deprecated.} =
|
||||
## **Deprecated since v0.20.0:** use ``initHeapQueue`` instead.
|
||||
proc newHeapQueue*[T](): HeapQueue[T] {.deprecated:
|
||||
"Deprecated since v0.20.0: use 'initHeapQueue' instead.".} =
|
||||
initHeapQueue[T]()
|
||||
|
||||
proc newHeapQueue*[T](heap: var HeapQueue[T]) {.deprecated.} =
|
||||
## **Deprecated since v0.20.0:** use ``clear`` instead.
|
||||
proc newHeapQueue*[T](heap: var HeapQueue[T]) {.deprecated:
|
||||
"Deprecated since v0.20.0: use 'clear' instead.".} =
|
||||
heap.clear()
|
||||
|
||||
when isMainModule:
|
||||
|
|
|
|||
|
|
@ -604,17 +604,13 @@ proc rightSize*(count: Natural): int {.inline.} =
|
|||
|
||||
|
||||
proc initSet*[A](initialSize = defaultInitialSize): HashSet[A] {.deprecated:
|
||||
"Deprecated since v0.20, use `initHashSet`"} = initHashSet[A](initialSize)
|
||||
## Deprecated since v0.20, use `initHashSet <#initHashSet,int>`_.
|
||||
"Deprecated since v0.20, use 'initHashSet'"} = initHashSet[A](initialSize)
|
||||
|
||||
proc toSet*[A](keys: openArray[A]): HashSet[A] {.deprecated:
|
||||
"Deprecated since v0.20, use `toHashSet`"} = toHashSet[A](keys)
|
||||
## Deprecated since v0.20, use `toHashSet <#toHashSet,openArray[A]>`_.
|
||||
"Deprecated since v0.20, use 'toHashSet'"} = toHashSet[A](keys)
|
||||
|
||||
proc isValid*[A](s: HashSet[A]): bool {.deprecated:
|
||||
"Deprecated since v0.20; sets are initialized by default"} =
|
||||
## **Deprecated since v0.20; sets are initialized by default**
|
||||
##
|
||||
## Returns `true` if the set has been initialized (with `initHashSet proc
|
||||
## <#initHashSet,int>`_ or `init proc <#init,HashSet[A],int>`_).
|
||||
##
|
||||
|
|
@ -942,7 +938,6 @@ iterator pairs*[A](s: OrderedSet[A]): tuple[a: int, b: A] =
|
|||
|
||||
proc isValid*[A](s: OrderedSet[A]): bool {.deprecated:
|
||||
"Deprecated since v0.20; sets are initialized by default"} =
|
||||
## **Deprecated since v0.20; sets are initialized by default**
|
||||
##
|
||||
## Returns `true` if the set has been initialized (with `initHashSet proc
|
||||
## <#initOrderedSet,int>`_ or `init proc <#init,OrderedSet[A],int>`_).
|
||||
|
|
|
|||
|
|
@ -92,8 +92,7 @@ proc deinitSharedList*[A](t: var SharedList[A]) =
|
|||
clear(t)
|
||||
deinitLock t.lock
|
||||
|
||||
proc initSharedList*[A](): SharedList[A] {.deprecated.} =
|
||||
## Deprecated. Use `init` instead.
|
||||
proc initSharedList*[A](): SharedList[A] {.deprecated: "use 'init' instead".} =
|
||||
## This is not posix compliant, may introduce undefined behavior.
|
||||
initLock result.lock
|
||||
result.head = nil
|
||||
|
|
|
|||
|
|
@ -219,8 +219,8 @@ proc deinitSharedTable*[A, B](t: var SharedTable[A, B]) =
|
|||
deallocShared(t.data)
|
||||
deinitLock t.lock
|
||||
|
||||
proc initSharedTable*[A, B](initialSize=64): SharedTable[A, B] {.deprecated.} =
|
||||
## Deprecated. Use `init` instead.
|
||||
proc initSharedTable*[A, B](initialSize=64): SharedTable[A, B] {.deprecated:
|
||||
"use 'init' instead".} =
|
||||
## This is not posix compliant, may introduce undefined behavior.
|
||||
assert isPowerOfTwo(initialSize)
|
||||
result.counter = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue