Allow consumers to retrieve borrowck output
This commit is contained in:
parent
cda5becc27
commit
388071a2cb
7 changed files with 111 additions and 48 deletions
|
@ -30,7 +30,7 @@ pub struct BorrowSet<'tcx> {
|
|||
/// Map from local to all the borrows on that local.
|
||||
pub local_map: FxIndexMap<mir::Local, FxIndexSet<BorrowIndex>>,
|
||||
|
||||
pub(crate) locals_state_at_exit: LocalsStateAtExit,
|
||||
pub locals_state_at_exit: LocalsStateAtExit,
|
||||
}
|
||||
|
||||
impl<'tcx> Index<BorrowIndex> for BorrowSet<'tcx> {
|
||||
|
@ -153,7 +153,7 @@ impl<'tcx> BorrowSet<'tcx> {
|
|||
self.activation_map.get(&location).map_or(&[], |activations| &activations[..])
|
||||
}
|
||||
|
||||
pub(crate) fn len(&self) -> usize {
|
||||
pub fn len(&self) -> usize {
|
||||
self.location_map.len()
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue