@@ -1011,12 +1011,13 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
10111011 }
10121012 }
10131013
1014- fn maybe_polonius_borrows_in_scope < ' s > (
1014+ fn borrows_in_scope < ' s > (
10151015 & self ,
10161016 location : Location ,
10171017 state : & ' s BorrowckDomain ,
10181018 ) -> Cow < ' s , BitSet < BorrowIndex > > {
10191019 if let Some ( polonius) = & self . polonius_output {
1020+ // Use polonius output if it has been enabled.
10201021 let location = self . location_table . start_index ( location) ;
10211022 let mut polonius_output = BitSet :: new_empty ( self . borrow_set . len ( ) ) ;
10221023 for & idx in polonius. errors_at ( location) {
@@ -1039,8 +1040,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
10391040 ) -> bool {
10401041 let mut error_reported = false ;
10411042
1042- // Use polonius output if it has been enabled.
1043- let borrows_in_scope = self . maybe_polonius_borrows_in_scope ( location, state) ;
1043+ let borrows_in_scope = self . borrows_in_scope ( location, state) ;
10441044
10451045 each_borrow_involving_path (
10461046 self ,
@@ -1172,7 +1172,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
11721172 let sd = AccessDepth :: Drop ;
11731173
11741174 // Use polonius output if it has been enabled.
1175- let borrows_in_scope = self . maybe_polonius_borrows_in_scope ( location, state) ;
1175+ let borrows_in_scope = self . borrows_in_scope ( location, state) ;
11761176
11771177 // This is a very simplified version of `Self::check_access_for_conflict`.
11781178 // We are here checking on BIDs and specifically still-live borrows of data involving the BIDs.
0 commit comments