mirror of
https://github.com/rust-lang/rust.git
synced 2025-05-14 02:49:40 +00:00
apply suggestions on fn name
This commit is contained in:
parent
045271cccc
commit
34edb21f0b
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user