disable "Warning: gc is deprecated" in compiler (#21137)

* disable "Warning: gc is deprecated" in compiler

* Apply @tersec 's suggestion
This commit is contained in:
ringabout
2022-12-20 15:04:13 +08:00
committed by GitHub
parent e278a781fc
commit 886572a516

View File

@@ -145,6 +145,7 @@ when defined(nimHasInvariant):
from std / compilesettings import SingleValueSetting, MultipleValueSetting
proc querySettingImpl(conf: ConfigRef, switch: BiggestInt): string =
{.push warning[Deprecated]:off.}
case SingleValueSetting(switch)
of arguments: result = conf.arguments
of outFile: result = conf.outFile.string
@@ -162,6 +163,7 @@ when defined(nimHasInvariant):
of libPath: result = conf.libpath.string
of gc: result = $conf.selectedGC
of mm: result = $conf.selectedGC
{.pop.}
proc querySettingSeqImpl(conf: ConfigRef, switch: BiggestInt): seq[string] =
template copySeq(field: untyped): untyped =