Skip to content

Commit

Permalink
HACK: avoid give_region_a_name ICE
Browse files Browse the repository at this point in the history
  • Loading branch information
lcnr committed Jan 15, 2025
1 parent ccc892f commit f8b46e1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions compiler/rustc_borrowck/src/diagnostics/region_name.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ impl<'tcx> MirBorrowckCtxt<'_, '_, 'tcx> {
.or_else(|| self.give_name_if_anonymous_region_appears_in_impl_signature(fr))
.or_else(|| {
self.give_name_if_anonymous_region_appears_in_arg_position_impl_trait(fr)
})
.or_else(|| {
Some(RegionName {
name: self.synthesize_region_name(),
source: RegionNameSource::Static,
})
});
});

if let Some(new_name) = new_name {
Expand Down

0 comments on commit f8b46e1

Please sign in to comment.