From fc8bfd781a68d3d3efdf713fa2c92c440c7783a2 Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Sun, 6 Nov 2022 18:50:10 +0800 Subject: [PATCH] fixes pre-existing `quit` documentation regression [backport] (#20763) fixes pre-existing `quit` documentation regression --- lib/system.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/system.nim b/lib/system.nim index 3cafb68828..b8b25f4984 100644 --- a/lib/system.nim +++ b/lib/system.nim @@ -2258,6 +2258,9 @@ when defined(js): when defined(nimNoQuit): proc quit*(errorcode: int = QuitSuccess) = discard "ignoring quit" + +elif defined(nimdoc): + proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.} ## Stops the program immediately with an exit code. ## ## Before stopping the program the "exit procedures" are called in the @@ -2286,9 +2289,6 @@ when defined(nimNoQuit): ## It does *not* call the garbage collector to free all the memory, ## unless an `addExitProc` proc calls `GC_fullCollect <#GC_fullCollect>`_. -elif defined(nimdoc): - proc quit*(errorcode: int = QuitSuccess) {.magic: "Exit", noreturn.} - elif defined(genode): proc quit*(errorcode: int = QuitSuccess) {.inline, noreturn.} = rawQuit(errorcode)