diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2021-04-23 13:50:27 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-23 13:50:27 +0200 |
commit | 511b6d2449c65cecc68eccbee1385e02758f0fd4 (patch) | |
tree | a8a3efea390b8e268a210361ceda24060df7d5ac /doc/destructors.rst | |
parent | dce0b3b002fcbac716bada039bed4a02eb501744 (diff) | |
download | Nim-511b6d2449c65cecc68eccbee1385e02758f0fd4.tar.gz |
typos (#17824)
Diffstat (limited to 'doc/destructors.rst')
-rw-r--r-- | doc/destructors.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/doc/destructors.rst b/doc/destructors.rst index 01e2d2ee9..c93fcabe1 100644 --- a/doc/destructors.rst +++ b/doc/destructors.rst @@ -277,7 +277,7 @@ 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.}`. +use `{.push sinkInference: on.}` ... `{.pop.}`. The `.nosinks`:idx: pragma can be used to disable this inference for a single routine: @@ -661,12 +661,12 @@ There is no copy during assigning operations. y[0] = 'h' # copy The program above shows when the copy operations happen. -When mutating the variable `y`, the Nim compiler creates a fresh copy of `x`, -the variable `y` won't point to the string literal anymore. -Instead it points to the copy of `x` of which the memory can be mutated +When mutating the variable `y`, the Nim compiler creates a fresh copy of `x`, +the variable `y` won't point to the string literal anymore. +Instead it points to the copy of `x` of which the memory can be mutated and the variable `y` becomes a mutable string. -.. Note:: The abstraction fails for `addr x` because whether the address is going to be used for mutations is unknown. +.. Note:: The abstraction fails for `addr x` because whether the address is going to be used for mutations is unknown. Let's look at a silly example demonstrating this behaviour: |