@@ -997,12 +997,13 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
997
997
}
998
998
}
999
999
1000
- fn maybe_polonius_borrows_in_scope < ' s > (
1000
+ fn borrows_in_scope < ' s > (
1001
1001
& self ,
1002
1002
location : Location ,
1003
1003
state : & ' s BorrowckDomain ,
1004
1004
) -> Cow < ' s , BitSet < BorrowIndex > > {
1005
1005
if let Some ( polonius) = & self . polonius_output {
1006
+ // Use polonius output if it has been enabled.
1006
1007
let location = self . location_table . start_index ( location) ;
1007
1008
let mut polonius_output = BitSet :: new_empty ( self . borrow_set . len ( ) ) ;
1008
1009
for & idx in polonius. errors_at ( location) {
@@ -1025,8 +1026,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
1025
1026
) -> bool {
1026
1027
let mut error_reported = false ;
1027
1028
1028
- // Use polonius output if it has been enabled.
1029
- let borrows_in_scope = self . maybe_polonius_borrows_in_scope ( location, state) ;
1029
+ let borrows_in_scope = self . borrows_in_scope ( location, state) ;
1030
1030
1031
1031
each_borrow_involving_path (
1032
1032
self ,
@@ -1158,7 +1158,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
1158
1158
let sd = AccessDepth :: Drop ;
1159
1159
1160
1160
// Use polonius output if it has been enabled.
1161
- let borrows_in_scope = self . maybe_polonius_borrows_in_scope ( location, state) ;
1161
+ let borrows_in_scope = self . borrows_in_scope ( location, state) ;
1162
1162
1163
1163
// This is a very simplified version of `Self::check_access_for_conflict`.
1164
1164
// We are here checking on BIDs and specifically still-live borrows of data involving the BIDs.
0 commit comments