about summary refs log tree commit diff
path: root/compiler/rustc_mir_dataflow
diff options
context:
space:
mode:
authorNicholas Nethercote <n.nethercote@gmail.com>2023-11-22 10:25:52 +1100
committerNicholas Nethercote <n.nethercote@gmail.com>2023-11-23 14:06:57 +1100
commitc16d3f32a489ef92e7812445ecf6dd6d5070439d (patch)
treedcbbbbcf737e93b42dd5d7148e0aa4b7a04980de /compiler/rustc_mir_dataflow
parentca741945f401d05d9fa2b7a535e1be7da03a5887 (diff)
downloadrust-c16d3f32a489ef92e7812445ecf6dd6d5070439d.tar.gz
rust-c16d3f32a489ef92e7812445ecf6dd6d5070439d.zip
Avoid unnecessary exports.
Diffstat (limited to 'compiler/rustc_mir_dataflow')
-rw-r--r--compiler/rustc_mir_dataflow/src/drop_flag_effects.rs2
-rw-r--r--compiler/rustc_mir_dataflow/src/framework/mod.rs2
-rw-r--r--compiler/rustc_mir_dataflow/src/lib.rs10
-rw-r--r--compiler/rustc_mir_dataflow/src/un_derefer.rs8
4 files changed, 11 insertions, 11 deletions
diff --git a/compiler/rustc_mir_dataflow/src/drop_flag_effects.rs b/compiler/rustc_mir_dataflow/src/drop_flag_effects.rs
index 81c1a50a5dd..90c4de1b9c5 100644
--- a/compiler/rustc_mir_dataflow/src/drop_flag_effects.rs
+++ b/compiler/rustc_mir_dataflow/src/drop_flag_effects.rs
@@ -128,7 +128,7 @@ pub fn drop_flag_effects_for_location<'tcx, F>(
     for_location_inits(tcx, body, move_data, loc, |mpi| callback(mpi, DropFlagState::Present));
 }
 
-pub fn for_location_inits<'tcx, F>(
+fn for_location_inits<'tcx, F>(
     tcx: TyCtxt<'tcx>,
     body: &Body<'tcx>,
     move_data: &MoveData<'tcx>,
diff --git a/compiler/rustc_mir_dataflow/src/framework/mod.rs b/compiler/rustc_mir_dataflow/src/framework/mod.rs
index 5020a1cf0b2..a5ae1edf221 100644
--- a/compiler/rustc_mir_dataflow/src/framework/mod.rs
+++ b/compiler/rustc_mir_dataflow/src/framework/mod.rs
@@ -45,7 +45,7 @@ pub mod graphviz;
 pub mod lattice;
 mod visitor;
 
-pub use self::cursor::{AnalysisResults, ResultsClonedCursor, ResultsCursor, ResultsRefCursor};
+pub use self::cursor::{ResultsClonedCursor, ResultsCursor, ResultsRefCursor};
 pub use self::direction::{Backward, Direction, Forward};
 pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
 pub use self::lattice::{JoinSemiLattice, MaybeReachable};
diff --git a/compiler/rustc_mir_dataflow/src/lib.rs b/compiler/rustc_mir_dataflow/src/lib.rs
index cb871ca8d5d..81149793c5a 100644
--- a/compiler/rustc_mir_dataflow/src/lib.rs
+++ b/compiler/rustc_mir_dataflow/src/lib.rs
@@ -22,12 +22,12 @@ pub use self::drop_flag_effects::{
     move_path_children_matching, on_all_children_bits, on_lookup_result_bits,
 };
 pub use self::framework::{
-    fmt, graphviz, lattice, visit_results, Analysis, AnalysisDomain, AnalysisResults, Backward,
-    CloneAnalysis, Direction, Engine, Forward, GenKill, GenKillAnalysis, JoinSemiLattice,
-    MaybeReachable, Results, ResultsCloned, ResultsClonedCursor, ResultsCursor, ResultsRefCursor,
-    ResultsVisitable, ResultsVisitor, SwitchIntEdgeEffects,
+    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::move_paths::MoveData;
 
 pub mod debuginfo;
diff --git a/compiler/rustc_mir_dataflow/src/un_derefer.rs b/compiler/rustc_mir_dataflow/src/un_derefer.rs
index 874d50ffd0e..b803ecc575e 100644
--- a/compiler/rustc_mir_dataflow/src/un_derefer.rs
+++ b/compiler/rustc_mir_dataflow/src/un_derefer.rs
@@ -3,13 +3,13 @@ use rustc_middle::mir::*;
 
 /// Used for reverting changes made by `DerefSeparator`
 #[derive(Default, Debug)]
-pub struct UnDerefer<'tcx> {
+pub(crate) struct UnDerefer<'tcx> {
     deref_chains: FxHashMap<Local, Vec<PlaceRef<'tcx>>>,
 }
 
 impl<'tcx> UnDerefer<'tcx> {
     #[inline]
-    pub fn insert(&mut self, local: Local, reffed: PlaceRef<'tcx>) {
+    pub(crate) fn insert(&mut self, local: Local, reffed: PlaceRef<'tcx>) {
         let mut chain = self.deref_chains.remove(&reffed.local).unwrap_or_default();
         chain.push(reffed);
         self.deref_chains.insert(local, chain);
@@ -17,7 +17,7 @@ impl<'tcx> UnDerefer<'tcx> {
 
     /// Returns the chain of places behind `DerefTemp` locals
     #[inline]
-    pub fn deref_chain(&self, local: Local) -> &[PlaceRef<'tcx>] {
+    pub(crate) fn deref_chain(&self, local: Local) -> &[PlaceRef<'tcx>] {
         self.deref_chains.get(&local).map(Vec::as_slice).unwrap_or_default()
     }
 
@@ -25,7 +25,7 @@ impl<'tcx> UnDerefer<'tcx> {
     ///
     /// See [`PlaceRef::iter_projections`]
     #[inline]
-    pub fn iter_projections(
+    pub(crate) fn iter_projections(
         &self,
         place: PlaceRef<'tcx>,
     ) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + '_ {