about summary refs log tree commit diff
path: root/tests/ui/lint/unused/unused-mut-warning-captured-var.fixed
blob: e8b6dd8640346ac405b68fb19c149a6b864907c3 (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); })();
}