I'm interested to know why a high bit for marking a BorrowMut. If a low bit (and then .fetch_add(2, ...) instead overflow checking becomes not required. In the case of a failed borrow attempt it is impossible to clobber the mutable borrow bit. In the case of a successful borrow I'm doubtful the several PiB required to represent all the AtomicBorrowRefs wouldn't be reached before an overflow becomes a problem.
I'm interested to know why a high bit for marking a
BorrowMut. If a low bit (and then.fetch_add(2, ...)instead overflow checking becomes not required. In the case of a failed borrow attempt it is impossible to clobber the mutable borrow bit. In the case of a successful borrow I'm doubtful the several PiB required to represent all theAtomicBorrowRefs wouldn't be reached before an overflow becomes a problem.