Skip to content

Commit

Permalink
Remove Clone requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
tmandry committed Jun 28, 2019
1 parent 11b09e7 commit aee1357
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion src/librustc_mir/dataflow/at_location.rs
Expand Up @@ -61,7 +61,6 @@ pub trait FlowsAtLocation {
/// (e.g., via `reconstruct_statement_effect` and
/// `reconstruct_terminator_effect`; don't forget to call
/// `apply_local_effect`).
#[derive(Clone)]
pub struct FlowAtLocation<'tcx, BD, DR = DataflowResults<'tcx, BD>>
where
BD: BitDenotation<'tcx>,
Expand Down
1 change: 0 additions & 1 deletion src/librustc_mir/dataflow/impls/storage_liveness.rs
Expand Up @@ -76,7 +76,6 @@ impl<'a, 'tcx> BottomValue for MaybeStorageLive<'a, 'tcx> {
/// In the case of a movable generator, borrowed_locals can be `None` and we
/// will not consider borrows in this pass. This relies on the fact that we only
/// use this pass at yield points for these generators.
#[derive(Clone)]
pub struct RequiresStorage<'mir, 'tcx, 'b> {
body: &'mir Body<'tcx>,
borrowed_locals:
Expand Down
3 changes: 1 addition & 2 deletions src/librustc_mir/dataflow/mod.rs
Expand Up @@ -345,8 +345,7 @@ pub(crate) trait DataflowResultsConsumer<'a, 'tcx: 'a> {
}

/// Allows iterating dataflow results in a flexible and reasonably fast way.
#[derive(Clone)]
pub struct DataflowResultsCursor<'mir, 'tcx, BD, DR>
pub struct DataflowResultsCursor<'mir, 'tcx, BD, DR = DataflowResults<'tcx, BD>>
where
BD: BitDenotation<'tcx>,
DR: Borrow<DataflowResults<'tcx, BD>>,
Expand Down
3 changes: 2 additions & 1 deletion src/librustc_mir/transform/generator.rs
Expand Up @@ -446,8 +446,9 @@ fn locals_live_across_suspend_points(
// for.
let requires_storage_analysis = RequiresStorage::new(body, &borrowed_locals_result);
let requires_storage =
do_dataflow(tcx, body, def_id, &[], &dead_unwinds, requires_storage_analysis.clone(),
do_dataflow(tcx, body, def_id, &[], &dead_unwinds, requires_storage_analysis,
|bd, p| DebugFormatted::new(&bd.body().local_decls[p]));
let requires_storage_analysis = RequiresStorage::new(body, &borrowed_locals_result);

// Calculate the liveness of MIR locals ignoring borrows.
let mut live_locals = liveness::LiveVarSet::new_empty(body.local_decls.len());
Expand Down

0 comments on commit aee1357

Please sign in to comment.