about summary refs log tree commit diff
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2019-10-04 14:20:57 +0200
committerFelix S. Klock II <pnkfelix@pnkfx.org>2019-10-04 14:20:57 +0200
commitc59d33a063c34cf2b5da440947acb158b3755b99 (patch)
tree6af53ba5f3a2a43405ac913d50ddb965bd50747b
parentcfb6d84720019236e33872e145d187dfd6e81090 (diff)
downloadrust-c59d33a063c34cf2b5da440947acb158b3755b99.tar.gz
rust-c59d33a063c34cf2b5da440947acb158b3755b99.zip
Add some missing normalization calls to fix #63154
-rw-r--r--src/librustc_mir/borrow_check/nll/type_check/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustc_mir/borrow_check/nll/type_check/mod.rs b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
index b24ba596d7e..60dfc43def7 100644
--- a/src/librustc_mir/borrow_check/nll/type_check/mod.rs
+++ b/src/librustc_mir/borrow_check/nll/type_check/mod.rs
@@ -1378,7 +1378,9 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
                 };
 
                 let place_ty = place.ty(body, tcx).ty;
+                let place_ty = self.normalize(place_ty, location);
                 let rv_ty = rv.ty(body, tcx);
+                let rv_ty = self.normalize(rv_ty, location);
                 if let Err(terr) =
                     self.sub_types_or_anon(rv_ty, place_ty, location.to_locations(), category)
                 {
@@ -1654,6 +1656,7 @@ impl<'a, 'tcx> TypeChecker<'a, 'tcx> {
         match *destination {
             Some((ref dest, _target_block)) => {
                 let dest_ty = dest.ty(body, tcx).ty;
+                let dest_ty = self.normalize(dest_ty, term_location);
                 let category = match *dest {
                     Place {
                         base: PlaceBase::Local(RETURN_PLACE),