From 389e2cc69a917ea7ddc40bef0c1bda0466b423db Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Thu, 23 Nov 2023 16:59:13 +1100 Subject: Remove some unused code relating to `ResultsCloned`. --- compiler/rustc_mir_dataflow/src/framework/cursor.rs | 13 +------------ compiler/rustc_mir_dataflow/src/framework/engine.rs | 14 -------------- 2 files changed, 1 insertion(+), 26 deletions(-) (limited to 'compiler/rustc_mir_dataflow/src/framework') diff --git a/compiler/rustc_mir_dataflow/src/framework/cursor.rs b/compiler/rustc_mir_dataflow/src/framework/cursor.rs index 5a77b2eff72..e27666d590b 100644 --- a/compiler/rustc_mir_dataflow/src/framework/cursor.rs +++ b/compiler/rustc_mir_dataflow/src/framework/cursor.rs @@ -1,6 +1,6 @@ //! Random access inspection of the results of a dataflow analysis. -use crate::{framework::BitSetExt, CloneAnalysis}; +use crate::framework::BitSetExt; use std::borrow::{Borrow, BorrowMut}; use std::cmp::Ordering; @@ -104,17 +104,6 @@ where } } -impl<'res, 'mir, 'tcx, A> ResultsClonedCursor<'res, 'mir, 'tcx, A> -where - A: Analysis<'tcx> + CloneAnalysis, -{ - /// Creates a new cursor over the same `Results`. Note that the cursor's position is *not* - /// copied. - pub fn new_cursor(&self) -> Self { - Self::new(self.body, self.results.reclone_analysis()) - } -} - impl<'mir, 'tcx, A, R> ResultsCursor<'mir, 'tcx, A, R> where A: Analysis<'tcx>, diff --git a/compiler/rustc_mir_dataflow/src/framework/engine.rs b/compiler/rustc_mir_dataflow/src/framework/engine.rs index 00a74b0d770..78b57008233 100644 --- a/compiler/rustc_mir_dataflow/src/framework/engine.rs +++ b/compiler/rustc_mir_dataflow/src/framework/engine.rs @@ -116,20 +116,6 @@ where } } -impl<'res, 'tcx, A> ResultsCloned<'res, 'tcx, A> -where - A: Analysis<'tcx> + CloneAnalysis, -{ - /// Creates a new `Results` type with a cloned `Analysis` and borrowed entry sets. - pub fn reclone_analysis(&self) -> Self { - Results { - analysis: self.analysis.clone_analysis(), - entry_sets: self.entry_sets, - _marker: PhantomData, - } - } -} - /// A solver for dataflow problems. pub struct Engine<'mir, 'tcx, A> where -- cgit 1.4.1-3-g733a5