1
Fork 0

have better explanation for relate_types

This commit is contained in:
ouz-a 2023-10-02 11:22:48 +03:00
parent 6f0c5ee2d4
commit 5d753abb30
13 changed files with 40 additions and 34 deletions

View file

@ -716,11 +716,9 @@ impl<'a, 'b, 'tcx> TypeVerifier<'a, 'b, 'tcx> {
}
PlaceTy::from_ty(fty)
}
ProjectionElem::Subtype(_) => PlaceTy::from_ty(Ty::new_error_with_message(
tcx,
self.last_span,
"ProjectionElem::Subtype shouldn't exist in borrowck",
)),
ProjectionElem::Subtype(_) => {
bug!("ProjectionElem::Subtype shouldn't exist in borrowck")
}
ProjectionElem::OpaqueCast(ty) => {
let ty = self.sanitize_type(place, ty);
let ty = self.cx.normalize(ty, location);