Closed
Description
The following code:
#![feature(unboxed_closures)]
fn main() {
let mut zarp: Vec<int> = Vec::new();
let cls = move |&mut:| {
zarp.push(3);
};
}
Generates the following warning:
warning: variable does not need to be mutable, #[warn(unused_mut)] on by default
let mut zarp: Vec<int> = Vec::new();
However if I remove the mut
from zarp
it fails to compile (as it should).