// Don't perform this on closures
match hir.get(hir_id) {
- hir::Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure(..), .. }) => {
+ hir::Node::Expr(&hir::Expr { kind: hir::ExprKind::Closure { .. }, .. }) => {
return None;
}
_ => {}
// May return None; sometimes the tables are not yet populated.
let ty = fn_sig.inputs()[index];
let mut found_anon_region = false;
- let new_param_ty = tcx.fold_regions(ty, &mut false, |r, _| {
+ let new_param_ty = tcx.fold_regions(ty, |r, _| {
if r == anon_region {
found_anon_region = true;
replace_region