summary refs log tree commit diff stats
path: root/doc/destructors.rst
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2020-07-28 19:18:46 +0200
committerGitHub <noreply@github.com>2020-07-28 19:18:46 +0200
commit86c9b7833917cd3deac912488e4dc18a1ca1223a (patch)
tree0d6fc12157c4cf9a23f38f5133cc49b1e0891400 /doc/destructors.rst
parente4e4931432fbc81b1ced68b351691228fae31d36 (diff)
downloadNim-86c9b7833917cd3deac912488e4dc18a1ca1223a.tar.gz
disable sink inference, only enable it for the stdlib. Reason: better source code compatibility (#15105)
Diffstat (limited to 'doc/destructors.rst')
-rw-r--r--doc/destructors.rst12
1 files changed, 8 insertions, 4 deletions
diff --git a/doc/destructors.rst b/doc/destructors.rst
index c97b17d6f..b433c38d7 100644
--- a/doc/destructors.rst
+++ b/doc/destructors.rst
@@ -261,8 +261,14 @@ optimizations (and the current implementation does not).
 Sink parameter inference
 ========================
 
-The current implementation does a limited form of sink parameter
-inference. The `.nosinks`:idx: pragma can be used to disable this inference
+The current implementation can do a limited form of sink parameter
+inference. But it has to be enabled via `--sinkInference:on`, either
+on the command line or via a `push` pragma.
+
+To enable it for a section of code, one can
+use `{.push sinkInference: on.}`...`{.pop.}`.
+
+The `.nosinks`:idx: pragma can be used to disable this inference
 for a single routine:
 
 .. code-block:: nim
@@ -270,8 +276,6 @@ for a single routine:
   proc addX(x: T; child: T) {.nosinks.} =
     x.s.add child
 
-To disable it for a section of code, one can
-use `{.push sinkInference: off.}`...`{.pop.}`.
 
 The details of the inference algorithm are currently undocumented.