summaryrefslogtreecommitdiffstats
path: root/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed
blob: c21f18015c11a80d6ce87fc37aa760277d144496 (plain)
1
2
3
4
5
6
7
8
9
// run-rustfix

#![forbid(unused_mut)]

fn main() {
    let x = 1;
    //~^ ERROR: variable does not need to be mutable
    (move|| { println!("{}", x); })();
}