Skip to content

Commit 9fb15ed

Browse files
committed
Rename function
1 parent 94bed6e commit 9fb15ed

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

frontend/exporter/src/traits/utils.rs

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,8 +167,10 @@ pub fn implied_predicates<'tcx>(
167167
}
168168
}
169169

170-
/// Erase all regions. Largely copied from `tcx.erase_regions`, but erases more regions.
171-
fn erase_all_regions<'tcx, T>(tcx: TyCtxt<'tcx>, value: T) -> T
170+
/// Erase free regions from the given value. Largely copied from `tcx.erase_regions`, but also
171+
/// erases bound regions that are bound outside `value`, so we can call this function inside a
172+
/// `Binder`.
173+
fn erase_free_regions<'tcx, T>(tcx: TyCtxt<'tcx>, value: T) -> T
172174
where
173175
T: TypeFoldable<TyCtxt<'tcx>>,
174176
{
@@ -216,7 +218,7 @@ pub fn erase_and_norm<'tcx, T>(tcx: TyCtxt<'tcx>, typing_env: TypingEnv<'tcx>, x
216218
where
217219
T: TypeFoldable<TyCtxt<'tcx>> + Copy,
218220
{
219-
erase_all_regions(
221+
erase_free_regions(
220222
tcx,
221223
tcx.try_normalize_erasing_regions(typing_env, x)
222224
.unwrap_or(x),

0 commit comments

Comments
 (0)