It is certainly documented 
<https://nim-lang.org/docs/destructors.html#the-cursor-pragma>

There is no copying in the above code. As can be seen by the pointers.

> Obviously, with literals and expressions the string does not exist on the 
> stack so copying is necessary

Strings never exist on the stack they're always a `(ptr StringData, len)` even 
in the case they point to a COW literal. So I'm uncertain what you think you're 
avoiding.

Reply via email to