[rust-dev] "let mut" <-> "var"

Daniel Micay danielmicay at gmail.com
Wed Jan 29 19:21:25 PST 2014

On Wed, Jan 29, 2014 at 10:20 PM, Samuel Williams
<space.ship.traveller at gmail.com> wrote:
> What about constant folding? Surely let mut x = 10 is easier for the
> compiler to optimise?

Rust can warn with 100% accuracy if a variable is unnecessarily
mutable. So, there's no benefit in terms of optimizations.

More information about the Rust-dev mailing list