External Publication
Visit Post

Idea: Borrowck Transparent Function Calls

Rust Internals [Unofficial] March 19, 2026
Source

Interesting.

So, we've been talking for a while about supporting structures where the borrows of different methods don't conflict, for public methods. And for public methods, we need something with a well-defined interface that doesn't depend on the implementation details of the method. For that, we've talked about having a way to declare named non-overlapping subsets of the structure, where a method says explicitly which subsets it borrows. View types are one example of this.

However, you're talking about non-public methods, and a mechanism that doesn't cross crate boundaries. For that , the idea of a more automatic, less explicitly declared mechanism seems potentially reasonable. At the very least, it's worth considering.

Discussion in the ATmosphere

Loading comments...