1
Fork 0

Avoid trying to normalize unnormalizable types

This commit is contained in:
Oli Scherer 2022-12-12 14:39:08 +00:00
parent 21917b0866
commit 30754517d1
2 changed files with 10 additions and 3 deletions

View file

@ -982,7 +982,10 @@ where
/// different binding level.
#[track_caller]
pub fn dummy(value: T) -> Binder<'tcx, T> {
assert!(!value.has_escaping_bound_vars());
assert!(
!value.has_escaping_bound_vars(),
"`{value:?}` has escaping bound vars, so it cannot be wrapped in a dummy binder."
);
Binder(value, ty::List::empty())
}