Skip to content

Commit 3d6168a

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

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

compiler/rustc_borrowck/src/diagnostics/region_name.rs

+6
Original file line numberDiff line numberDiff line change
@@ -265,6 +265,12 @@ 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+
})
268274
});
269275

270276
if let Some(new_name) = new_name {

0 commit comments

Comments
 (0)