dyn* through more typechecking and MIR

This commit is contained in:
Eric Holk
2022-06-28 14:02:30 -07:00
parent 7fccac3ea0
commit 549c105bb3
15 changed files with 168 additions and 13 deletions

View File

@@ -1113,6 +1113,12 @@ pub trait ToPredicate<'tcx> {
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx>;
}
impl<'tcx> ToPredicate<'tcx> for Predicate<'tcx> {
fn to_predicate(self, _tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {
self
}
}
impl<'tcx> ToPredicate<'tcx> for Binder<'tcx, PredicateKind<'tcx>> {
#[inline(always)]
fn to_predicate(self, tcx: TyCtxt<'tcx>) -> Predicate<'tcx> {