I'm sorry. There is now a mode called by-copy, which was needed to make constructors behave sensibly in the face of proper enforcement of noncopyability. By-copy works just like by-move, except that when the passed value is an lvalue, it is copied instead of moved (or, if it is a type that can't be copied, an error is raised). By-copy guarantees that the callee owns the passed argument, and does it in a way that generates as few copies as possible. Tag variant constructors, object constructors, and resource constructors now all take their arguments by copy.
Don't worry too much about passing-style proliferation. I think by-copy will turn out to supersede by-move. Once we have warnings for accidental copies of uniques (the code exists, but it won't be practical to turn it on until vectors become non-unique again), there won't be much of a reason to use by-move over by-copy. We'll also be able to remove the user-visible distinction between by-val and by-ref at some point (though we might want to keep that in native functions only). Cheers, Marijn _______________________________________________ Rust-dev mailing list Rust-dev@mozilla.org https://mail.mozilla.org/listinfo/rust-dev