Avoid unnecessary exports.
This commit is contained in:
parent
ca741945f4
commit
c16d3f32a4
@ -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>,
|
||||
|
@ -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};
|
||||
|
@ -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;
|
||||
|
@ -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>)> + '_ {
|
||||
|
Loading…
x
Reference in New Issue
Block a user