Skip to content

Commit

Permalink
Add some missing normalization calls to fix #63154
Browse files Browse the repository at this point in the history
  • Loading branch information
pnkfelix committed Oct 4, 2019
1 parent cfb6d84 commit c59d33a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/librustc_mir/borrow_check/nll/type_check/mod.rs
Expand Up @@ -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)
{
Expand Down Expand Up @@ -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),
Expand Down

0 comments on commit c59d33a

Please sign in to comment.