Fix errors
This commit is contained in:
parent
d020ff0c68
commit
1787d4ecf5
2 changed files with 1 additions and 9 deletions
|
|
@ -433,7 +433,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||
self.diverge_cleanup_gen(true);
|
||||
|
||||
let src_info = self.scopes[0].source_info(self.fn_span);
|
||||
let tmp = self.get_unit_temp();
|
||||
let mut block = self.cfg.start_new_block();
|
||||
let result = block;
|
||||
let mut rest = &mut self.scopes[..];
|
||||
|
|
@ -463,13 +462,6 @@ impl<'a, 'gcx, 'tcx> Builder<'a, 'gcx, 'tcx> {
|
|||
|
||||
// End all regions for scopes out of which we are breaking.
|
||||
self.cfg.push_end_region(block, src_info, scope.extent);
|
||||
|
||||
if let Some(ref free_data) = scope.free {
|
||||
let next = self.cfg.start_new_block();
|
||||
let free = build_free(self.hir.tcx(), &tmp, free_data, next);
|
||||
self.cfg.terminate(block, scope.source_info(free_data.span), free);
|
||||
block = next;
|
||||
}
|
||||
}
|
||||
|
||||
self.cfg.terminate(block, src_info, TerminatorKind::GeneratorDrop);
|
||||
|
|
|
|||
|
|
@ -576,7 +576,7 @@ fn creator_generator_resume_function<'a, 'tcx>(
|
|||
|
||||
make_generator_state_argument_indirect(tcx, def_id, mir);
|
||||
|
||||
no_landing_pads(tcx, &mut mir);
|
||||
no_landing_pads(tcx, mir);
|
||||
|
||||
// Make sure we remove dead blocks to remove
|
||||
// unrelated code from the drop part of the function
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue