Skip to content

Commit

Permalink
apply suggestions on fn name
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiangfei2009 authored and compiler-errors committed Jan 8, 2025
1 parent 045271c commit 34edb21
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions compiler/rustc_borrowck/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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,
Expand Down Expand Up @@ -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.
Expand Down

0 comments on commit 34edb21

Please sign in to comment.