Which variables lowered Rust changes, so their bindings are mut: a let whose value a later
statement changes in place, a closure argument its body changes, and an owned argument a
rebinding updates in place, as scores = Map.put(scores, name, 1) becomes
scores.insert(name, 1);.
Summary
Functions
Marks the lets and closure arguments of a lowered body that it changes mut.
Marks the variables of pattern in mutable_vars mut.
The variables a lowered body changes in place through a statement calling a mutating
method on them, as scores.insert(name, 1); does where scores was rebound to its update.
Whether a method changes its receiver, as std collections' &mut self methods do.
A binding of a collection to its update, map = Map.put(map, key, value), as the in-place
change of that collection, map.insert(key, value);, where the update takes the collection
at its last use; any other statement unchanged.
Functions
@spec infer_mutability([RustQ.Rust.AST.stmt()]) :: [RustQ.Rust.AST.stmt()]
Marks the lets and closure arguments of a lowered body that it changes mut.
@spec mark_mutable_pattern_vars(RustQ.Rust.AST.pat(), MapSet.t(atom())) :: RustQ.Rust.AST.pat()
Marks the variables of pattern in mutable_vars mut.
The variables a lowered body changes in place through a statement calling a mutating
method on them, as scores.insert(name, 1); does where scores was rebound to its update.
Whether a method changes its receiver, as std collections' &mut self methods do.
@spec updated_in_place(RustQ.Rust.AST.stmt()) :: RustQ.Rust.AST.stmt()
A binding of a collection to its update, map = Map.put(map, key, value), as the in-place
change of that collection, map.insert(key, value);, where the update takes the collection
at its last use; any other statement unchanged.