1
Fork 0

Revert portion of PR #83521 that injected issue #85435 (and thus exposed underlying issue #85561).

This commit is contained in:
Felix S. Klock II 2021-05-21 14:55:09 -04:00
parent af2ed1b518
commit 1f130fbff8

View file

@ -185,6 +185,10 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
// match x { _ => () } // fake read of `x`
// };
// ```
//
// FIXME(RFC2229, rust#85435): Remove feature gate once diagnostics are
// improved and unsafe checking works properly in closure bodies again.
if this.tcx.features().capture_disjoint_fields {
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
let place_builder =
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));
@ -202,6 +206,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
);
}
}
}
// see (*) above
let operands: Vec<_> = upvars