better error message
This commit is contained in:
parent
3616b0698b
commit
517dd800f8
1 changed files with 1 additions and 1 deletions
|
|
@ -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))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue