Avoid unnecessary exports.

This commit is contained in:
Nicholas Nethercote 2023-11-22 10:25:52 +11:00
parent ca741945f4
commit c16d3f32a4
4 changed files with 11 additions and 11 deletions

View File

@ -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)); 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>, tcx: TyCtxt<'tcx>,
body: &Body<'tcx>, body: &Body<'tcx>,
move_data: &MoveData<'tcx>, move_data: &MoveData<'tcx>,

View File

@ -45,7 +45,7 @@ pub mod graphviz;
pub mod lattice; pub mod lattice;
mod visitor; 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::direction::{Backward, Direction, Forward};
pub use self::engine::{Engine, EntrySets, Results, ResultsCloned}; pub use self::engine::{Engine, EntrySets, Results, ResultsCloned};
pub use self::lattice::{JoinSemiLattice, MaybeReachable}; pub use self::lattice::{JoinSemiLattice, MaybeReachable};

View File

@ -22,12 +22,12 @@ pub use self::drop_flag_effects::{
move_path_children_matching, on_all_children_bits, on_lookup_result_bits, move_path_children_matching, on_all_children_bits, on_lookup_result_bits,
}; };
pub use self::framework::{ pub use self::framework::{
fmt, graphviz, lattice, visit_results, Analysis, AnalysisDomain, AnalysisResults, Backward, fmt, lattice, visit_results, Analysis, AnalysisDomain, Direction, GenKill, GenKillAnalysis,
CloneAnalysis, Direction, Engine, Forward, GenKill, GenKillAnalysis, JoinSemiLattice, JoinSemiLattice, MaybeReachable, Results, ResultsCursor, ResultsVisitable, ResultsVisitor,
MaybeReachable, Results, ResultsCloned, ResultsClonedCursor, ResultsCursor, ResultsRefCursor, };
ResultsVisitable, ResultsVisitor, SwitchIntEdgeEffects, use self::framework::{
Backward, CloneAnalysis, Forward, ResultsClonedCursor, SwitchIntEdgeEffects,
}; };
use self::move_paths::MoveData; use self::move_paths::MoveData;
pub mod debuginfo; pub mod debuginfo;

View File

@ -3,13 +3,13 @@ use rustc_middle::mir::*;
/// Used for reverting changes made by `DerefSeparator` /// Used for reverting changes made by `DerefSeparator`
#[derive(Default, Debug)] #[derive(Default, Debug)]
pub struct UnDerefer<'tcx> { pub(crate) struct UnDerefer<'tcx> {
deref_chains: FxHashMap<Local, Vec<PlaceRef<'tcx>>>, deref_chains: FxHashMap<Local, Vec<PlaceRef<'tcx>>>,
} }
impl<'tcx> UnDerefer<'tcx> { impl<'tcx> UnDerefer<'tcx> {
#[inline] #[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(); let mut chain = self.deref_chains.remove(&reffed.local).unwrap_or_default();
chain.push(reffed); chain.push(reffed);
self.deref_chains.insert(local, chain); self.deref_chains.insert(local, chain);
@ -17,7 +17,7 @@ impl<'tcx> UnDerefer<'tcx> {
/// Returns the chain of places behind `DerefTemp` locals /// Returns the chain of places behind `DerefTemp` locals
#[inline] #[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() self.deref_chains.get(&local).map(Vec::as_slice).unwrap_or_default()
} }
@ -25,7 +25,7 @@ impl<'tcx> UnDerefer<'tcx> {
/// ///
/// See [`PlaceRef::iter_projections`] /// See [`PlaceRef::iter_projections`]
#[inline] #[inline]
pub fn iter_projections( pub(crate) fn iter_projections(
&self, &self,
place: PlaceRef<'tcx>, place: PlaceRef<'tcx>,
) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + '_ { ) -> impl Iterator<Item = (PlaceRef<'tcx>, PlaceElem<'tcx>)> + '_ {