> Yes. What would be legal would be:
>
>    let x = @{a: 10};
>    x = @{a: 20};

That seems a rather heavy-handed restriction.

> No, it is legal to do `f(foo.x)` but, depending on the type of `foo.x`,
> `f()` might be restricted in what it can do with the reference.  For
> example:

How about this:

    let x = @{mutable y: 10};
    let f = fn@(u: int) { x.y = 20; log(error, u); }
    f(x.y); // Where f's arg is passed by reference, whichever
notation you'd use for that
_______________________________________________
Rust-dev mailing list
[email protected]
https://mail.mozilla.org/listinfo/rust-dev

Reply via email to