Skip to content

Commit 7da7205

Browse files
committed
returns immediately on references error
1 parent 6f8aa3d commit 7da7205

File tree

1 file changed

+1
-2
lines changed
  • src/librustc_mir/borrow_check/nll/type_check

1 file changed

+1
-2
lines changed

src/librustc_mir/borrow_check/nll/type_check/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -415,10 +415,9 @@ impl<'a, 'b, 'gcx, 'tcx> TypeVerifier<'a, 'b, 'gcx, 'tcx> {
415415
if let PlaceTy::Ty { ty } = place_ty {
416416
if ty.references_error() {
417417
assert!(self.errors_reported);
418-
place_ty = PlaceTy::Ty {
418+
return PlaceTy::Ty {
419419
ty: self.tcx().types.err,
420420
};
421-
break;
422421
}
423422
}
424423
place_ty = self.sanitize_projection(place_ty, elem, place, location);

0 commit comments

Comments
 (0)