1
Fork 0

Support safe transmute in new solver

This commit is contained in:
Michael Goulet 2023-04-09 00:09:53 +00:00
parent 2a198c7f62
commit d92f74e43b
5 changed files with 67 additions and 0 deletions

View file

@ -83,6 +83,9 @@ pub trait TypeVisitableExt<'tcx>: TypeVisitable<TyCtxt<'tcx>> {
| TypeFlags::HAS_CT_PLACEHOLDER,
)
}
fn has_non_region_placeholders(&self) -> bool {
self.has_type_flags(TypeFlags::HAS_TY_PLACEHOLDER | TypeFlags::HAS_CT_PLACEHOLDER)
}
fn needs_subst(&self) -> bool {
self.has_type_flags(TypeFlags::NEEDS_SUBST)
}