Skip to content

Commit

Permalink
Fixes #10824 (#12437)
Browse files Browse the repository at this point in the history
  • Loading branch information
juancarlospaco authored and Araq committed Oct 17, 2019
1 parent 2cfd58d commit 4d1f69c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions doc/manual.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6224,6 +6224,25 @@ but are used to override the settings temporarily. Example:
# ... some code ...
{.pop.} # restore old settings
`push/pop`:idx: can switch on/off some standard library pragmas, example:

.. code-block:: nim
{.push inline.}
proc thisIsInlined(): int = 42
func willBeInlined(): float = 42.0
{.pop.}
proc notInlined(): int = 9
{.push discardable, boundChecks: off, compileTime, noSideEffect, experimental.}
template example(): string = "https://nim-lang.org"
{.pop.}
{.push deprecated, hint[LineTooLong]: off, used, stackTrace: off.}
proc sample(): bool = true
{.pop.}
For third party pragmas it depends on its implementation, but uses the same syntax.


register pragma
---------------
Expand Down

0 comments on commit 4d1f69c

Please sign in to comment.