about summary refs log tree commit diff
path: root/tests/ui/nll/unused-mut-issue-50343.rs
blob: d63823ae1f74fb29339f91843a6f5347da6b5b2d (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
}