summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAntonis <b3liever@yandex.com>2020-05-11 14:59:51 +0300
committerAndreas Rumpf <rumpf_a@web.de>2020-05-11 15:39:44 +0200
commit517dd800f8e621aae0221f15c4ad7ad011c910b5 (patch)
tree636ef8408279bab853d9b42f8a83e2ff36019e8b
parent3616b0698baf230fec7a60cd90c72b979e582179 (diff)
downloadNim-517dd800f8e621aae0221f15c4ad7ad011c910b5.tar.gz
better error message
-rw-r--r--compiler/injectdestructors.nim2
1 files changed, 1 insertions, 1 deletions
diff --git a/compiler/injectdestructors.nim b/compiler/injectdestructors.nim
index 9ed3d4189..09c072da7 100644
--- a/compiler/injectdestructors.nim
+++ b/compiler/injectdestructors.nim
@@ -398,7 +398,7 @@ proc passCopyToSink(n: PNode; c: var Con): PNode =
     if isLValue(n) and not isClosureEnv(n) and n.typ.skipTypes(abstractInst).kind != tyRef and c.inSpawn == 0:
       message(c.graph.config, n.info, hintPerformance,
         ("passing '$1' to a sink parameter introduces an implicit copy; " &
-        "use 'move($1)' to prevent it") % $n)
+        "if possible, rearrange your program's control flow to prevent it") % $n)
   else:
     if c.graph.config.selectedGC in {gcArc, gcOrc}:
       assert(not containsGarbageCollectedRef(n.typ))