@@ -1011,12 +1011,13 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
1011
1011
}
1012
1012
}
1013
1013
1014
- fn maybe_polonius_borrows_in_scope < ' s > (
1014
+ fn borrows_in_scope < ' s > (
1015
1015
& self ,
1016
1016
location : Location ,
1017
1017
state : & ' s BorrowckDomain ,
1018
1018
) -> Cow < ' s , BitSet < BorrowIndex > > {
1019
1019
if let Some ( polonius) = & self . polonius_output {
1020
+ // Use polonius output if it has been enabled.
1020
1021
let location = self . location_table . start_index ( location) ;
1021
1022
let mut polonius_output = BitSet :: new_empty ( self . borrow_set . len ( ) ) ;
1022
1023
for & idx in polonius. errors_at ( location) {
@@ -1039,8 +1040,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
1039
1040
) -> bool {
1040
1041
let mut error_reported = false ;
1041
1042
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) ;
1044
1044
1045
1045
each_borrow_involving_path (
1046
1046
self ,
@@ -1172,7 +1172,7 @@ impl<'a, 'tcx> MirBorrowckCtxt<'a, '_, 'tcx> {
1172
1172
let sd = AccessDepth :: Drop ;
1173
1173
1174
1174
// 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) ;
1176
1176
1177
1177
// This is a very simplified version of `Self::check_access_for_conflict`.
1178
1178
// We are here checking on BIDs and specifically still-live borrows of data involving the BIDs.
0 commit comments