Where you used to write
fn(by_alias: &some_ty, by_mut_alias: &mutable [int], by_move: -int) { ... }
You now write
fn(by_reference: some_ty, &by_mut_reference: [int], -by_move: int) { ... }
That is, the mode glyph now comes before the argument name (in
function types, when there is no argument name, it comes before the
type as it used to). The & glyph now denotes mutable reference. All
arguments without explicitly specified mode are now passed by
reference, with the alias analysis inserting copies when it detects an
unsafe aliasing that can be copied without a change in semantics.
You'll still see alias errors when a copy is not possible because the
value is structurally mutable.
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev