On 18/11/2011 12:07 PM, Marijn Haverbeke wrote:
I somewhat share your worries about the cleverness of the
last-userule. But my logic for adding it anyway is: A) We need to do
thisanyway as an optimization, so B) if we are already doing it, we
mightas well remove the burden of explicitly annotating moves from the
userto the compiler. I still think an explicit unary move would be
auseful addition for allowing people to write more obvious code, but
Idon't think the kind checker should complain about copies that
arealready going to be optimized to moves anyway.

Agreed.

(You might also want to take a look -- sorry I didn't catch you doing this earlier and mention it -- at the flow analysis done in typestate. I think it knows last uses as well. You might be able to borrow what it knows.)

-Graydon

_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to