This doesn't work: import std/strformat import results proc foo():Result[void,cstring] = let res = -1 err(&"failed {r}") Run
because Result[T,cstring] is special-cased to 'avoid dangling cstring pointers' is there a simple test case that you can share that shows the danger here? is the only safe option to use Result[T,string] internally, and convert to cstring at the ffi boundary? i'm already exposing a faked `Result<T>` c++ class, lifetimes are gonna be a bitch anyway, i think i've answered my own question and i should put the conversion in the `error` accessor method, but if you've got any wisdom on the matter, i'd appreciate it.