blob: 1312fd6425b65638399cde6f6027e019c5372b26 [file] [log] [blame]
//@ run-rustfix
//! diagnostic test for #132806: make sure the suggestion to bind by-reference in patterns doesn't
//! erroneously remove the wrong `&`
use std::collections::HashMap;
fn main() {
let _ = HashMap::<String, i32>::new().iter().filter(|&(&_k, &_v)| { true });
//~^ ERROR cannot move out of a shared reference
}