Begin to implement type system layer of unsafe binders

This commit is contained in:
Michael Goulet
2024-12-21 17:05:40 +00:00
parent b22856d192
commit 9a1c5eb5b3
79 changed files with 536 additions and 305 deletions

View File

@@ -83,7 +83,8 @@ pub fn trivial_dropck_outlives<'tcx>(tcx: TyCtxt<'tcx>, ty: Ty<'tcx>) -> bool {
| ty::Placeholder(..)
| ty::Infer(_)
| ty::Bound(..)
| ty::Coroutine(..) => false,
| ty::Coroutine(..)
| ty::UnsafeBinder(_) => false,
}
}
@@ -336,6 +337,11 @@ pub fn dtorck_constraint_for_ty_inner<'tcx>(
constraints.dtorck_types.push(ty);
}
// Can't instantiate binder here.
ty::UnsafeBinder(_) => {
constraints.dtorck_types.push(ty);
}
ty::Placeholder(..) | ty::Bound(..) | ty::Infer(..) | ty::Error(_) => {
// By the time this code runs, all type variables ought to
// be fully resolved.