Remove Clone requirement
This commit is contained in:
parent
11b09e7f9e
commit
aee13574f2
4 changed files with 3 additions and 5 deletions
|
|
@ -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>,
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
|
|
@ -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>>,
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue