small refactor to region error handling

This commit is contained in:
lcnr
2024-12-06 14:23:18 +01:00
parent a1b38aa437
commit e6349b414e
10 changed files with 95 additions and 131 deletions

View File

@@ -41,8 +41,7 @@ impl<'a> DescriptionCtx<'a> {
}
ty::ReLateParam(ref fr) => {
if !fr.bound_region.is_named()
&& let Some((ty, _)) =
find_anon_type(tcx, generic_param_scope, region, &fr.bound_region)
&& let Some((ty, _)) = find_anon_type(tcx, generic_param_scope, region)
{
(Some(ty.span), "defined_here", String::new())
} else {