| 1126 | cx: &'b InferCx<'a, impl Specialization>, |
| 1127 | ) -> impl fmt::Debug + Captures<'a> + '_ { |
| 1128 | fn debug_var_found<'a, A: smallvec::Array<Item = T> + 'a, T: 'a, TD: fmt::Display>( |
| 1129 | var_found: &'a SmallIntMap<impl smallvec::Array<Item = SmallVec<A>>>, |
| 1130 | display: &'a impl Fn(&'a T) -> TD, |
| 1131 | ) -> impl Iterator<Item = impl fmt::Debug + 'a> + 'a { |
| 1132 | var_found |
| 1133 | .0 |
| 1134 | .iter() |
| 1135 | .filter(|found| !found.is_empty()) |
| 1136 | .map(move |found| { |
| 1137 | FmtBy(move |f| { |
| 1138 | let mut found = found.iter().map(display); |
| 1139 | write!(f, "{}", found.next().unwrap())?; |
| 1140 | for x in found { |
| 1141 | write!(f, " = {x}")?; |
| 1142 | } |
| 1143 | Ok(()) |
| 1144 | }) |
| 1145 | }) |
| 1146 | } |
| 1147 | FmtBy(move |f| { |
| 1148 | let Self { |
| 1149 | ambiguous, |