Remove crate
visibility usage in compiler
This commit is contained in:
parent
536020c5f9
commit
49c82f31a8
186 changed files with 865 additions and 800 deletions
|
@ -29,7 +29,7 @@ pub struct BorrowSet<'tcx> {
|
|||
/// Map from local to all the borrows on that local.
|
||||
pub local_map: FxHashMap<mir::Local, FxHashSet<BorrowIndex>>,
|
||||
|
||||
crate locals_state_at_exit: LocalsStateAtExit,
|
||||
pub(crate) locals_state_at_exit: LocalsStateAtExit,
|
||||
}
|
||||
|
||||
impl<'tcx> Index<BorrowIndex> for BorrowSet<'tcx> {
|
||||
|
@ -148,23 +148,23 @@ impl<'tcx> BorrowSet<'tcx> {
|
|||
}
|
||||
}
|
||||
|
||||
crate fn activations_at_location(&self, location: Location) -> &[BorrowIndex] {
|
||||
pub(crate) fn activations_at_location(&self, location: Location) -> &[BorrowIndex] {
|
||||
self.activation_map.get(&location).map_or(&[], |activations| &activations[..])
|
||||
}
|
||||
|
||||
crate fn len(&self) -> usize {
|
||||
pub(crate) fn len(&self) -> usize {
|
||||
self.location_map.len()
|
||||
}
|
||||
|
||||
crate fn indices(&self) -> impl Iterator<Item = BorrowIndex> {
|
||||
pub(crate) fn indices(&self) -> impl Iterator<Item = BorrowIndex> {
|
||||
BorrowIndex::from_usize(0)..BorrowIndex::from_usize(self.len())
|
||||
}
|
||||
|
||||
crate fn iter_enumerated(&self) -> impl Iterator<Item = (BorrowIndex, &BorrowData<'tcx>)> {
|
||||
pub(crate) fn iter_enumerated(&self) -> impl Iterator<Item = (BorrowIndex, &BorrowData<'tcx>)> {
|
||||
self.indices().zip(self.location_map.values())
|
||||
}
|
||||
|
||||
crate fn get_index_of(&self, location: &Location) -> Option<BorrowIndex> {
|
||||
pub(crate) fn get_index_of(&self, location: &Location) -> Option<BorrowIndex> {
|
||||
self.location_map.get_index_of(location).map(BorrowIndex::from)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue