Skip to content

Commit 1ef85d8

Browse files
assertion, comment
1 parent 4bcca32 commit 1ef85d8

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

compiler/rustc_trait_selection/src/solve/normalize.rs

+4
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,15 @@ pub(crate) fn deeply_normalize<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
2020
at: At<'_, 'tcx>,
2121
value: T,
2222
) -> Result<T, Vec<FulfillmentError<'tcx>>> {
23+
assert!(!value.has_escaping_bound_vars());
2324
deeply_normalize_with_skipped_universes(at, value, vec![])
2425
}
2526

2627
/// Deeply normalize all aliases in `value`. This does not handle inference and expects
2728
/// its input to be already fully resolved.
29+
///
30+
/// Additionally takes a list of universes which represents the binders which have been
31+
/// entered before passing `value` to the function.
2832
pub(crate) fn deeply_normalize_with_skipped_universes<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
2933
at: At<'_, 'tcx>,
3034
value: T,

0 commit comments

Comments
 (0)