From b8d340db1409e4a8275788597d1e8caab99f053d Mon Sep 17 00:00:00 2001 From: Nicholas Nethercote Date: Wed, 22 Nov 2023 14:15:26 +1100 Subject: [PATCH] Remove unnecessary `ValueAnalysisWrapper::Direction`. `Forward` is the default. --- compiler/rustc_mir_dataflow/src/lib.rs | 4 +--- compiler/rustc_mir_dataflow/src/value_analysis.rs | 2 -- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/compiler/rustc_mir_dataflow/src/lib.rs b/compiler/rustc_mir_dataflow/src/lib.rs index 81149793c5a..cd3378375d8 100644 --- a/compiler/rustc_mir_dataflow/src/lib.rs +++ b/compiler/rustc_mir_dataflow/src/lib.rs @@ -25,9 +25,7 @@ fmt, lattice, visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis, JoinSemiLattice, MaybeReachable, Results, ResultsCursor, ResultsVisitable, ResultsVisitor, }; -use self::framework::{ - Backward, CloneAnalysis, Forward, ResultsClonedCursor, SwitchIntEdgeEffects, -}; +use self::framework::{Backward, CloneAnalysis, ResultsClonedCursor, SwitchIntEdgeEffects}; use self::move_paths::MoveData; pub mod debuginfo; diff --git a/compiler/rustc_mir_dataflow/src/value_analysis.rs b/compiler/rustc_mir_dataflow/src/value_analysis.rs index 45da1ab9e18..addea2c9b87 100644 --- a/compiler/rustc_mir_dataflow/src/value_analysis.rs +++ b/compiler/rustc_mir_dataflow/src/value_analysis.rs @@ -332,8 +332,6 @@ fn wrap(self) -> ValueAnalysisWrapper impl<'tcx, T: ValueAnalysis<'tcx>> AnalysisDomain<'tcx> for ValueAnalysisWrapper { type Domain = State; - type Direction = crate::Forward; - const NAME: &'static str = T::NAME; fn bottom_value(&self, _body: &Body<'tcx>) -> Self::Domain {