Fix some wrong dereferences after rebase

This commit is contained in:
Santiago Pastorino 2020-01-28 12:17:02 -03:00
parent a13a7d74ca
commit 3021856626
No known key found for this signature in database
GPG Key ID: 88C941CDA1D46432
2 changed files with 3 additions and 3 deletions

View File

@ -699,7 +699,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
let root_place_projection = self.infcx.tcx.intern_place_elems(root_place.projection);
if self.access_place_error_reported.contains(&(
Place { local: *root_place.local, projection: root_place_projection },
Place { local: root_place.local, projection: root_place_projection },
borrow_span,
)) {
debug!(
@ -710,7 +710,7 @@ impl<'cx, 'tcx> MirBorrowckCtxt<'cx, 'tcx> {
}
self.access_place_error_reported.insert((
Place { local: *root_place.local, projection: root_place_projection },
Place { local: root_place.local, projection: root_place_projection },
borrow_span,
));

View File

@ -1258,7 +1258,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
.into_iter()
.map(|matched_place_ref| {
let matched_place = Place {
local: *matched_place_ref.local,
local: matched_place_ref.local,
projection: tcx.intern_place_elems(matched_place_ref.projection),
};
let fake_borrow_deref_ty = matched_place.ty(&self.local_decls, tcx).ty;