remove allow_two_phase_borrow

it's been simplified over the years, but now it's no longer useful.

- document its replacement in `BorrowKind`
- use that everywhere instead
This commit is contained in:
Rémy Rakic
2024-12-30 11:12:53 +00:00
parent ff1aaa52ff
commit 79d761d93c
5 changed files with 8 additions and 14 deletions

View File

@@ -455,6 +455,8 @@ impl BorrowKind {
}
}
/// Returns whether borrows represented by this kind are allowed to be split into separate
/// Reservation and Activation phases.
pub fn allows_two_phase_borrow(&self) -> bool {
match *self {
BorrowKind::Shared