Skip to content

Commit aee1357

Browse files
committed
Remove Clone requirement
1 parent 11b09e7 commit aee1357

File tree

4 files changed

+3
-5
lines changed

4 files changed

+3
-5
lines changed

src/librustc_mir/dataflow/at_location.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,6 @@ pub trait FlowsAtLocation {
6161
/// (e.g., via `reconstruct_statement_effect` and
6262
/// `reconstruct_terminator_effect`; don't forget to call
6363
/// `apply_local_effect`).
64-
#[derive(Clone)]
6564
pub struct FlowAtLocation<'tcx, BD, DR = DataflowResults<'tcx, BD>>
6665
where
6766
BD: BitDenotation<'tcx>,

src/librustc_mir/dataflow/impls/storage_liveness.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,6 @@ impl<'a, 'tcx> BottomValue for MaybeStorageLive<'a, 'tcx> {
7676
/// In the case of a movable generator, borrowed_locals can be `None` and we
7777
/// will not consider borrows in this pass. This relies on the fact that we only
7878
/// use this pass at yield points for these generators.
79-
#[derive(Clone)]
8079
pub struct RequiresStorage<'mir, 'tcx, 'b> {
8180
body: &'mir Body<'tcx>,
8281
borrowed_locals:

src/librustc_mir/dataflow/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -345,8 +345,7 @@ pub(crate) trait DataflowResultsConsumer<'a, 'tcx: 'a> {
345345
}
346346

347347
/// Allows iterating dataflow results in a flexible and reasonably fast way.
348-
#[derive(Clone)]
349-
pub struct DataflowResultsCursor<'mir, 'tcx, BD, DR>
348+
pub struct DataflowResultsCursor<'mir, 'tcx, BD, DR = DataflowResults<'tcx, BD>>
350349
where
351350
BD: BitDenotation<'tcx>,
352351
DR: Borrow<DataflowResults<'tcx, BD>>,

src/librustc_mir/transform/generator.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,8 +446,9 @@ fn locals_live_across_suspend_points(
446446
// for.
447447
let requires_storage_analysis = RequiresStorage::new(body, &borrowed_locals_result);
448448
let requires_storage =
449-
do_dataflow(tcx, body, def_id, &[], &dead_unwinds, requires_storage_analysis.clone(),
449+
do_dataflow(tcx, body, def_id, &[], &dead_unwinds, requires_storage_analysis,
450450
|bd, p| DebugFormatted::new(&bd.body().local_decls[p]));
451+
let requires_storage_analysis = RequiresStorage::new(body, &borrowed_locals_result);
451452

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

0 commit comments

Comments
 (0)