1 // Regression test for #47244: in this specific scenario, when the
2 // expected type indicated 1 argument but the closure takes two, we
3 // would (early on) create type variables for the type of `b`. If the
4 // user then attempts to invoke a method on `b`, we would get an error
5 // saying that the type of `b` must be known, which was not very
10 use std::collections::HashMap;
13 let mut m = HashMap::new();
14 m.insert("foo", "bar");
16 let _n = m.iter().map(|(_, b)| {
17 //~^ ERROR closure is expected to take a single 2-tuple