> If dw were an owned ref instead of a dangling one, the current behaviour is 
> correct and there should be no errors. as dw lives beyond any other 
> references that would be made in the body of main.

... but `proc sinkprocUsing(dst: var Widget; src: sink Widget)` doesn`t expect 
an owned Widget. With rust syntax though , an annotation: `proc 
sinkprocUsing(dst: var 'a Widget; src: sink 'a Widget)` could be given. Then, 
the compiler could infer at callsite (main), that an owned Widget `src` gets 
destroyed via `sink`, but its lifetime and therefore the referenced object 
itself will survive in `dst`. Since other (non-owned) aliases of `src` could 
exist, the lifetime transfer has to be obeyed in main (bookkeeping). But then, 
you will unavoidably end with rust's lifetime reasoning and lifetime inference. 
Araq will not appreciate this, I think.

Reply via email to