diff options
Diffstat (limited to 'doc/destructors.rst')
-rw-r--r-- | doc/destructors.rst | 12 |
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. |