about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow/src/framework/mod.rs
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-23 17:17:52 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-27 10:35:42 +1100
commitd957c4718377b8cb0dacc58cdbaa5a3fe82c53cc (patch)
tree9b8e10cd70b62f40c1e3caa0ba0afdb1fc4ab374 /compiler/rustc_mir_dataflow/src/framework/mod.rs
parent389e2cc69a917ea7ddc40bef0c1bda0466b423db (diff)
downloadrust-d957c4718377b8cb0dacc58cdbaa5a3fe82c53cc.tar.gz
rust-d957c4718377b8cb0dacc58cdbaa5a3fe82c53cc.zip
Remove `CloneAnalysis`.
It's only implemented for analyses that implement `Copy`, which means
it's basically a complicated synonym for `Copy`. So this commit removes
it and uses `Copy` directly. (That direct use will be removed in a later
commit.)
Diffstat (limited to 'compiler/rustc_mir_dataflow/src/framework/mod.rs')
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/mod.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs
index a5ae1edf221..36c02e329e3 100644
--- a/compiler/rustc_mir_dataflow/src/framework/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs
@@ -246,21 +246,6 @@ pub trait Analysis<'tcx>: AnalysisDomain<'tcx> {
     }
 }
 
-/// Defines an `Analysis` which can be cloned for use in multiple `ResultsCursor`s or
-/// `ResultsVisitor`s. Note this need not be a full clone, only enough of one to be used with a new
-/// `ResultsCursor` or `ResultsVisitor`
-pub trait CloneAnalysis {
-    fn clone_analysis(&self) -> Self;
-}
-impl<'tcx, A> CloneAnalysis for A
-where
-    A: Analysis<'tcx> + Copy,
-{
-    fn clone_analysis(&self) -> Self {
-        *self
-    }
-}
-
 /// A gen/kill dataflow problem.
 ///
 /// Each method in this trait has a corresponding one in `Analysis`. However, these methods only