Added to docs: warning string for {.deprecated.} pragma (#8783)
This commit is contained in:
parent
b4edfa613b
commit
50aa376e80
1 changed files with 5 additions and 1 deletions
|
|
@ -6448,6 +6448,11 @@ The deprecated pragma is used to mark a symbol as deprecated:
|
||||||
proc p() {.deprecated.}
|
proc p() {.deprecated.}
|
||||||
var x {.deprecated.}: char
|
var x {.deprecated.}: char
|
||||||
|
|
||||||
|
This pragma can also take in an optional warning string to relay to developers.
|
||||||
|
|
||||||
|
.. code-block:: nim
|
||||||
|
proc thing(x: bool) {.deprecated: "See arguments of otherThing()".}
|
||||||
|
|
||||||
It can also be used as a statement, in that case it takes a list of *renamings*.
|
It can also be used as a statement, in that case it takes a list of *renamings*.
|
||||||
|
|
||||||
.. code-block:: nim
|
.. code-block:: nim
|
||||||
|
|
@ -6456,7 +6461,6 @@ It can also be used as a statement, in that case it takes a list of *renamings*.
|
||||||
Stream = ref object
|
Stream = ref object
|
||||||
{.deprecated: [TFile: File, PStream: Stream].}
|
{.deprecated: [TFile: File, PStream: Stream].}
|
||||||
|
|
||||||
|
|
||||||
noSideEffect pragma
|
noSideEffect pragma
|
||||||
-------------------
|
-------------------
|
||||||
The ``noSideEffect`` pragma is used to mark a proc/iterator to have no side
|
The ``noSideEffect`` pragma is used to mark a proc/iterator to have no side
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue