]> git.lizzy.rs Git - rust.git/blob - tests/ui/lint/unused/unused-mut-warning-captured-var.fixed
Rollup merge of #106670 - albertlarsan68:check-docs-in-pr-ci, r=Mark-Simulacrum
[rust.git] / tests / ui / lint / unused / unused-mut-warning-captured-var.fixed
1 // run-rustfix
2
3 #![forbid(unused_mut)]
4
5 fn main() {
6     let x = 1;
7     //~^ ERROR: variable does not need to be mutable
8     (move|| { println!("{}", x); })();
9 }