1
Fork 0

if $c:expr { Some($r:expr) } else { None } =>> $c.then(|| $r)

This commit is contained in:
Maybe Waffle 2023-02-15 11:43:41 +00:00
parent af3c8b2726
commit 8751fa1a9a
54 changed files with 159 additions and 281 deletions

View file

@ -90,20 +90,18 @@ pub fn find_param_with_region<'tcx>(
r
}
});
if found_anon_region {
found_anon_region.then(|| {
let ty_hir_id = fn_decl.inputs[index].hir_id;
let param_ty_span = hir.span(ty_hir_id);
let is_first = index == 0;
Some(AnonymousParamInfo {
AnonymousParamInfo {
param,
param_ty: new_param_ty,
param_ty_span,
bound_region,
is_first,
})
} else {
None
}
}
})
})
}