Avoid trying to normalize unnormalizable types
This commit is contained in:
parent
21917b0866
commit
30754517d1
2 changed files with 10 additions and 3 deletions
|
@ -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())
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue