Fix relations

This commit is contained in:
Michael Goulet 2024-07-16 00:14:44 -04:00
parent 8d90f442ca
commit 0b5ce54bc2
9 changed files with 25 additions and 25 deletions

View file

@ -36,7 +36,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for MatchAgainstFreshVars<'tcx> {
"MatchAgainstFreshVars"
}
fn tcx(&self) -> TyCtxt<'tcx> {
fn cx(&self) -> TyCtxt<'tcx> {
self.tcx
}
@ -77,7 +77,7 @@ impl<'tcx> TypeRelation<TyCtxt<'tcx>> for MatchAgainstFreshVars<'tcx> {
Err(TypeError::Sorts(ExpectedFound::new(true, a, b)))
}
(&ty::Error(guar), _) | (_, &ty::Error(guar)) => Ok(Ty::new_error(self.tcx(), guar)),
(&ty::Error(guar), _) | (_, &ty::Error(guar)) => Ok(Ty::new_error(self.cx(), guar)),
_ => structurally_relate_tys(self, a, b),
}