assertion, comment

This commit is contained in:
Michael Goulet 2023-07-13 18:27:40 +00:00
parent 4bcca3294a
commit 1ef85d82e0

View file

@ -20,11 +20,15 @@ pub(crate) fn deeply_normalize<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
at: At<'_, 'tcx>, at: At<'_, 'tcx>,
value: T, value: T,
) -> Result<T, Vec<FulfillmentError<'tcx>>> { ) -> Result<T, Vec<FulfillmentError<'tcx>>> {
assert!(!value.has_escaping_bound_vars());
deeply_normalize_with_skipped_universes(at, value, vec![]) deeply_normalize_with_skipped_universes(at, value, vec![])
} }
/// Deeply normalize all aliases in `value`. This does not handle inference and expects /// Deeply normalize all aliases in `value`. This does not handle inference and expects
/// its input to be already fully resolved. /// its input to be already fully resolved.
///
/// Additionally takes a list of universes which represents the binders which have been
/// entered before passing `value` to the function.
pub(crate) fn deeply_normalize_with_skipped_universes<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>( pub(crate) fn deeply_normalize_with_skipped_universes<'tcx, T: TypeFoldable<TyCtxt<'tcx>>>(
at: At<'_, 'tcx>, at: At<'_, 'tcx>,
value: T, value: T,