# Could you borrow a bit?

**URL:** <https://internals.rust-lang.org/t/could-you-borrow-a-bit/24300>\
**Category:** language design\
**Created:** [May 15, 2026, 12:24am UTC](https://internals.rust-lang.org/t/could-you-borrow-a-bit/24300 "2026-05-15T00:24:23Z")\
**Posts on this page:** 1\
**Showing post:** 8

<div class="post-metadata">

**Author:** ![steffahn](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steffahn/32/13288_2.png) [@steffahn](https://internals.rust-lang.org/u/steffahn)\
**Post date:** [May 15, 2026, 2:14pm UTC](https://internals.rust-lang.org/t/could-you-borrow-a-bit/24300/8 "2026-05-15T14:14:55Z")

</div>

I’m now noticing that the ask in this thread has large overlap with parts of the discussion in your recent previous thread: [`BitSlice` or a sound way to implement one](https://internals.rust-lang.org/t/bitslice-or-a-sound-way-to-implement-one/24194)

Regarding

> [@bascule](#):
>
> But if the language supported mutable borrow splitting at a sub-byte granularity, then it could be possible.

specifically the last replies starting with

> [@\`BitSlice\` or a sound way to implement one](https://internals.rust-lang.org/t/bitslice-or-a-sound-way-to-implement-one/24194/13):
>
> This is definitely only possible with language support. At the assembly level you can overwrite individual bits at a memory address with AND/ORD. But at the library level you're faced with the problem that you can't overwrite neighbouring bits you don't own, and you can't read+update them because they may be uninitialized or be being written concurrently. It sucks that seemingly no low-level language lets you manipulate data at bit-level granularity the same way you can at byte-level. (I did lo…

As far as I understand the reality of possible implementations, you’d **have** to be either restricting split mutable borrows to stay within the same thread (i.e. some degree of introducing `!Sync` or `!Send` with these types) _or_ you’d need to implement modifications of individual bits in a byte with atomic operations.

---

_[View the full topic](https://internals.rust-lang.org/t/could-you-borrow-a-bit/24300)._
