[rust-dev] Why doesn't rust require "mut" param prefix at call site?

Patrick Walton pcwalton at mozilla.com
Fri Jan 3 09:02:45 PST 2014

On 1/3/14 2:25 AM, Stefan Plantikow wrote:
> Maybe completely off here but why is mutability not tracked by the
> region system? Wouldn’t that help solve this issue? i.e. assignment
> to a mutable lvalue would only be allowed from an rvalue in a mutable
> region.   Haven’t thought about how that relates to
> freezing/thawing.

It kind of is, in that mutation generally requires a unique ownership 
path. See the comments in the borrow checker for more details.


More information about the Rust-dev mailing list