about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--compiler/rustc_borrowck/src/lib.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/rustc_borrowck/src/lib.rs b/compiler/rustc_borrowck/src/lib.rs
index 8d8a3c67c7b..7eb714009d1 100644
--- a/compiler/rustc_borrowck/src/lib.rs
+++ b/compiler/rustc_borrowck/src/lib.rs
@@ -1011,12 +1011,13 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
         }
     }
 
-    fn maybe_polonius_borrows_in_scope<'s>(
+    fn borrows_in_scope<'s>(
         &self,
         location: Location,
         state: &'s BorrowckDomain,
     ) -> Cow<'s, BitSet<BorrowIndex>> {
         if let Some(polonius) = &self.polonius_output {
+            // Use polonius output if it has been enabled.
             let location = self.location_table.start_index(location);
             let mut polonius_output = BitSet::new_empty(self.borrow_set.len());
             for &idx in polonius.errors_at(location) {
@@ -1039,8 +1040,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
     ) -> bool {
         let mut error_reported = false;
 
-        // Use polonius output if it has been enabled.
-        let borrows_in_scope = self.maybe_polonius_borrows_in_scope(location, state);
+        let borrows_in_scope = self.borrows_in_scope(location, state);
 
         each_borrow_involving_path(
             self,
@@ -1172,7 +1172,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
         let sd = AccessDepth::Drop;
 
         // Use polonius output if it has been enabled.
-        let borrows_in_scope = self.maybe_polonius_borrows_in_scope(location, state);
+        let borrows_in_scope = self.borrows_in_scope(location, state);
 
         // This is a very simplified version of `Self::check_access_for_conflict`.
         // We are here checking on BIDs and specifically still-live borrows of data involving the BIDs.