From 1dd2379e4c662a090086456fdbe0569332967db0 Mon Sep 17 00:00:00 2001 From: HOLYCOWBATMAN Date: Sun, 24 May 2015 15:29:35 -0400 Subject: system.nim -> disabled Uninit warnings --- lib/system.nim | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/system.nim') diff --git a/lib/system.nim b/lib/system.nim index 1e6f76f3d..c02ae4bb3 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -61,7 +61,7 @@ const on* = true ## alias for ``true`` off* = false ## alias for ``false`` -{.push warning[GcMem]: off.} +{.push warning[GcMem]: off, warning[Uninit]: off.} {.push hints: off.} type @@ -3273,4 +3273,4 @@ proc xlen*[T](x: seq[T]): int {.magic: "XLenSeq", noSideEffect.} = ## This is an optimization that rarely makes sense. discard -{.pop.} #{.push warning[GcMem]: off.} +{.pop.} #{.push warning[GcMem]: off, warning[Uninit]: off.} -- cgit 1.4.1-2-gfad0 From 513423a08dcc6f2011f9af394c2a66c54445d5eb Mon Sep 17 00:00:00 2001 From: apense Date: Mon, 25 May 2015 02:44:08 -0400 Subject: Corrected various links within documentation Corrected `noSideEffect pragma` links in lib/system (The newer documentation uses slightly different links) Corrected `noSideEffect pragma` in types links to match the updated link names Minor link adjustment in stmts to match the newer link names --- doc/manual/stmts.txt | 6 +++--- doc/manual/types.txt | 2 +- lib/system.nim | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) (limited to 'lib/system.nim') diff --git a/doc/manual/stmts.txt b/doc/manual/stmts.txt index 5e47110e9..210ca7064 100644 --- a/doc/manual/stmts.txt +++ b/doc/manual/stmts.txt @@ -176,9 +176,9 @@ The rules for compile-time computability are: 1. Literals are compile-time computable. 2. Type conversions are compile-time computable. 3. Procedure calls of the form ``p(X)`` are compile-time computable if - ``p`` is a proc without side-effects (see the `noSideEffect pragma`_ - for details) and if ``X`` is a (possibly empty) list of compile-time - computable arguments. + ``p`` is a proc without side-effects (see the `noSideEffect pragma + <#pragmas-nosideeffect-pragma>`_ for details) and if ``X`` is a + (possibly empty) list of compile-time computable arguments. Constants cannot be of type ``ptr``, ``ref``, ``var`` or ``object``, nor can diff --git a/doc/manual/types.txt b/doc/manual/types.txt index bdf51941d..689605f08 100644 --- a/doc/manual/types.txt +++ b/doc/manual/types.txt @@ -963,7 +963,7 @@ Most calling conventions exist only for the Windows 32-bit platform. Assigning/passing a procedure to a procedural variable is only allowed if one of the following conditions hold: 1) The procedure that is accessed resides in the current module. -2) The procedure is marked with the ``procvar`` pragma (see `procvar pragma`_). +2) The procedure is marked with the ``procvar`` pragma (see `procvar pragma <#pragmas-procvar-pragma>`_). 3) The procedure has a calling convention that differs from ``nimcall``. 4) The procedure is anonymous. diff --git a/lib/system.nim b/lib/system.nim index c02ae4bb3..a4b053ca7 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2248,14 +2248,14 @@ proc echo*(x: varargs[expr, `$`]) {.magic: "Echo", tags: [WriteIOEffect], ## Unlike other IO operations this is guaranteed to be thread-safe as ## ``echo`` is very often used for debugging convenience. If you want to use ## ``echo`` inside a `proc without side effects - ## `_ you can use `debugEcho <#debugEcho>`_ + ## `_ you can use `debugEcho <#debugEcho>`_ ## instead. proc debugEcho*(x: varargs[expr, `$`]) {.magic: "Echo", noSideEffect, tags: [], raises: [].} ## Same as `echo <#echo>`_, but as a special semantic rule, ``debugEcho`` ## pretends to be free of side effects, so that it can be used for debugging - ## routines marked as `noSideEffect `_. + ## routines marked as `noSideEffect `_. template newException*(exceptn: typedesc, message: string): expr = ## creates an exception object of type ``exceptn`` and sets its ``msg`` field -- cgit 1.4.1-2-gfad0