Skip to content

Commit f8b46e1

Browse files
committed
HACK: avoid give_region_a_name ICE
1 parent ccc892f commit f8b46e1

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+7
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,13 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
265265
.or_else(|| self.give_name_if_anonymous_region_appears_in_impl_signature(fr))
266266
.or_else(|| {
267267
self.give_name_if_anonymous_region_appears_in_arg_position_impl_trait(fr)
268+
})
269+
.or_else(|| {
270+
Some(RegionName {
271+
name: self.synthesize_region_name(),
272+
source: RegionNameSource::Static,
273+
})
274+
});
268275
});
269276

270277
if let Some(new_name) = new_name {

0 commit comments

Comments
 (0)