Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix errors
  • Loading branch information
Zoxc committed Aug 12, 2017
1 parent d020ff0 commit 1787d4e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 9 deletions.
8 changes: 0 additions & 8 deletions src/librustc_mir/build/scope.rs
Expand Up @@ -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[..];
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion src/librustc_mir/transform/generator.rs
Expand Up @@ -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
Expand Down

0 comments on commit 1787d4e

Please sign in to comment.