Remove crate
visibility usage in compiler
This commit is contained in:
parent
536020c5f9
commit
49c82f31a8
186 changed files with 865 additions and 800 deletions
|
@ -8,19 +8,19 @@ use std::ops::Index;
|
|||
|
||||
use crate::type_check::Locations;
|
||||
|
||||
crate mod graph;
|
||||
pub(crate) mod graph;
|
||||
|
||||
/// A set of NLL region constraints. These include "outlives"
|
||||
/// constraints of the form `R1: R2`. Each constraint is identified by
|
||||
/// a unique `OutlivesConstraintIndex` and you can index into the set
|
||||
/// (`constraint_set[i]`) to access the constraint details.
|
||||
#[derive(Clone, Default)]
|
||||
crate struct OutlivesConstraintSet<'tcx> {
|
||||
pub(crate) struct OutlivesConstraintSet<'tcx> {
|
||||
outlives: IndexVec<OutlivesConstraintIndex, OutlivesConstraint<'tcx>>,
|
||||
}
|
||||
|
||||
impl<'tcx> OutlivesConstraintSet<'tcx> {
|
||||
crate fn push(&mut self, constraint: OutlivesConstraint<'tcx>) {
|
||||
pub(crate) fn push(&mut self, constraint: OutlivesConstraint<'tcx>) {
|
||||
debug!(
|
||||
"OutlivesConstraintSet::push({:?}: {:?} @ {:?}",
|
||||
constraint.sup, constraint.sub, constraint.locations
|
||||
|
@ -38,20 +38,20 @@ impl<'tcx> OutlivesConstraintSet<'tcx> {
|
|||
/// N.B., this graph contains a "frozen" view of the current
|
||||
/// constraints. Any new constraints added to the `OutlivesConstraintSet`
|
||||
/// after the graph is built will not be present in the graph.
|
||||
crate fn graph(&self, num_region_vars: usize) -> graph::NormalConstraintGraph {
|
||||
pub(crate) fn graph(&self, num_region_vars: usize) -> graph::NormalConstraintGraph {
|
||||
graph::ConstraintGraph::new(graph::Normal, self, num_region_vars)
|
||||
}
|
||||
|
||||
/// Like `graph`, but constraints a reverse graph where `R1: R2`
|
||||
/// represents an edge `R2 -> R1`.
|
||||
crate fn reverse_graph(&self, num_region_vars: usize) -> graph::ReverseConstraintGraph {
|
||||
pub(crate) fn reverse_graph(&self, num_region_vars: usize) -> graph::ReverseConstraintGraph {
|
||||
graph::ConstraintGraph::new(graph::Reverse, self, num_region_vars)
|
||||
}
|
||||
|
||||
/// Computes cycles (SCCs) in the graph of regions. In particular,
|
||||
/// find all regions R1, R2 such that R1: R2 and R2: R1 and group
|
||||
/// them into an SCC, and find the relationships between SCCs.
|
||||
crate fn compute_sccs(
|
||||
pub(crate) fn compute_sccs(
|
||||
&self,
|
||||
constraint_graph: &graph::NormalConstraintGraph,
|
||||
static_region: RegionVid,
|
||||
|
@ -60,7 +60,7 @@ impl<'tcx> OutlivesConstraintSet<'tcx> {
|
|||
Sccs::new(region_graph)
|
||||
}
|
||||
|
||||
crate fn outlives(&self) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint<'tcx>> {
|
||||
pub(crate) fn outlives(&self) -> &IndexVec<OutlivesConstraintIndex, OutlivesConstraint<'tcx>> {
|
||||
&self.outlives
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue