External Publication
Visit Post

Could you borrow a bit?

Rust Internals [Unofficial] May 15, 2026
Source
Without doing due diligence to search for past proposals, loosening Index[Mut] to return any type that implements Deref[Mut] rather than a hardcoded reference would cover this use case…but I suspect that's massively breaking in practice. Although maybe if you made it a new trait GeneralizedIndex, since people mostly only care about the subscript sugar…

Discussion in the ATmosphere

Loading comments...