* implements https://github.com/nim-lang/RFCs/issues/258

* don't be too strict with custom pragma blocks

* cast pragmas: documentation

* added most missing inference query procs to effecttraits.nim
This commit is contained in:
Andreas Rumpf 2020-10-06 16:47:15 +02:00 • committed by GitHub
commit 92163fa330
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 232 additions and 68 deletions

View file

@ -6031,12 +6031,12 @@ so that it can be used for debugging routines marked as ``noSideEffect``.
To override the compiler's side effect analysis a ``{.noSideEffect.}``
pragma block can be used:
``cast`` pragma block can be used:
.. code-block:: nim
func f() =
{.noSideEffect.}:
{.cast(noSideEffect).}:
echo "test"
@ -7501,7 +7501,7 @@ To disable the GC-safety checking the ``--threadAnalysis:off`` command line
switch can be used. This is a temporary workaround to ease the porting effort
from old code to the new threading model.
To override the compiler's gcsafety analysis a ``{.gcsafe.}`` pragma block can
To override the compiler's gcsafety analysis a ``{.cast(gcsafe).}`` pragma block can
be used:
.. code-block:: nim
@ -7511,7 +7511,7 @@ be used:
perThread {.threadvar.}: string
proc setPerThread() =
{.gcsafe.}:
{.cast(gcsafe).}:
deepCopy(perThread, someGlobal)