summaryrefslogtreecommitdiffstats
path: root/tests/ui/nll/unused-mut-issue-50343.rs
blob: c849ac8c79e43243bfb40c18c7803d6aac5cd108 (plain)
1
2
3
4
5
6
7
8
9
// run-rustfix

#![deny(unused_mut)]
#![allow(unused_variables)] // for rustfix

fn main() {
    vec![(42, 22)].iter().map(|(mut x, _y)| ()).count();
    //~^ ERROR: variable does not need to be mutable
}