Skip to content

Commit 389e2cc

Browse files
committed
Remove some unused code relating to ResultsCloned.
1 parent b85cba8 commit 389e2cc

File tree

4 files changed

+2
-39
lines changed

4 files changed

+2
-39
lines changed

compiler/rustc_mir_dataflow/src/framework/cursor.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//! Random access inspection of the results of a dataflow analysis.
22
3-
use crate::{framework::BitSetExt, CloneAnalysis};
3+
use crate::framework::BitSetExt;
44

55
use std::borrow::{Borrow, BorrowMut};
66
use std::cmp::Ordering;
@@ -104,17 +104,6 @@ where
104104
}
105105
}
106106

107-
impl<'res, 'mir, 'tcx, A> ResultsClonedCursor<'res, 'mir, 'tcx, A>
108-
where
109-
A: Analysis<'tcx> + CloneAnalysis,
110-
{
111-
/// Creates a new cursor over the same `Results`. Note that the cursor's position is *not*
112-
/// copied.
113-
pub fn new_cursor(&self) -> Self {
114-
Self::new(self.body, self.results.reclone_analysis())
115-
}
116-
}
117-
118107
impl<'mir, 'tcx, A, R> ResultsCursor<'mir, 'tcx, A, R>
119108
where
120109
A: Analysis<'tcx>,

compiler/rustc_mir_dataflow/src/framework/engine.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -116,20 +116,6 @@ where
116116
}
117117
}
118118

119-
impl<'res, 'tcx, A> ResultsCloned<'res, 'tcx, A>
120-
where
121-
A: Analysis<'tcx> + CloneAnalysis,
122-
{
123-
/// Creates a new `Results` type with a cloned `Analysis` and borrowed entry sets.
124-
pub fn reclone_analysis(&self) -> Self {
125-
Results {
126-
analysis: self.analysis.clone_analysis(),
127-
entry_sets: self.entry_sets,
128-
_marker: PhantomData,
129-
}
130-
}
131-
}
132-
133119
/// A solver for dataflow problems.
134120
pub struct Engine<'mir, 'tcx, A>
135121
where

compiler/rustc_mir_dataflow/src/impls/storage_liveness.rs

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,6 @@ impl<'a> MaybeStorageLive<'a> {
1818
}
1919
}
2020

21-
impl crate::CloneAnalysis for MaybeStorageLive<'_> {
22-
fn clone_analysis(&self) -> Self {
23-
self.clone()
24-
}
25-
}
26-
2721
impl<'tcx, 'a> crate::AnalysisDomain<'tcx> for MaybeStorageLive<'a> {
2822
type Domain = BitSet<Local>;
2923

@@ -173,12 +167,6 @@ impl<'res, 'mir, 'tcx> MaybeRequiresStorage<'res, 'mir, 'tcx> {
173167
}
174168
}
175169

176-
impl crate::CloneAnalysis for MaybeRequiresStorage<'_, '_, '_> {
177-
fn clone_analysis(&self) -> Self {
178-
Self { borrowed_locals: self.borrowed_locals.new_cursor() }
179-
}
180-
}
181-
182170
impl<'tcx> crate::AnalysisDomain<'tcx> for MaybeRequiresStorage<'_, '_, 'tcx> {
183171
type Domain = BitSet<Local>;
184172

compiler/rustc_mir_dataflow/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ pub use self::framework::{
2323
fmt, lattice, visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis,
2424
JoinSemiLattice, MaybeReachable, Results, ResultsCursor, ResultsVisitable, ResultsVisitor,
2525
};
26-
use self::framework::{Backward, CloneAnalysis, ResultsClonedCursor, SwitchIntEdgeEffects};
26+
use self::framework::{Backward, ResultsClonedCursor, SwitchIntEdgeEffects};
2727
use self::move_paths::MoveData;
2828

2929
pub mod debuginfo;

0 commit comments

Comments
 (0)