Skip to content

Commit 382338f

Browse files
committed
Remove feature gate
1 parent 027d73d commit 382338f

File tree

1 file changed

+15
-19
lines changed

1 file changed

+15
-19
lines changed

compiler/rustc_mir_build/src/build/expr/as_rvalue.rs

+15-19
Original file line numberDiff line numberDiff line change
@@ -186,25 +186,21 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
186186
// };
187187
// ```
188188
//
189-
// FIXME(RFC2229, rust#85435): Remove feature gate once diagnostics are
190-
// improved and unsafe checking works properly in closure bodies again.
191-
if this.tcx.features().capture_disjoint_fields {
192-
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
193-
let place_builder =
194-
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));
195-
196-
if let Ok(place_builder_resolved) =
197-
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
198-
{
199-
let mir_place =
200-
place_builder_resolved.into_place(this.tcx, this.typeck_results);
201-
this.cfg.push_fake_read(
202-
block,
203-
this.source_info(this.tcx.hir().span(*hir_id)),
204-
*cause,
205-
mir_place,
206-
);
207-
}
189+
for (thir_place, cause, hir_id) in fake_reads.into_iter() {
190+
let place_builder =
191+
unpack!(block = this.as_place_builder(block, &this.thir[*thir_place]));
192+
193+
if let Ok(place_builder_resolved) =
194+
place_builder.try_upvars_resolved(this.tcx, this.typeck_results)
195+
{
196+
let mir_place =
197+
place_builder_resolved.into_place(this.tcx, this.typeck_results);
198+
this.cfg.push_fake_read(
199+
block,
200+
this.source_info(this.tcx.hir().span(*hir_id)),
201+
*cause,
202+
mir_place,
203+
);
208204
}
209205
}
210206

0 commit comments

Comments
 (0)