Idea: Borrowck Transparent Function Calls
Rust Internals [Unofficial]
March 20, 2026
I think we all agree that view types are the best long-term solution. We can also assume that the explicitness of explicit view type, will in practice not be a real issue because tooling will help to write it.
But in the meantime, could #[annotation] be used, just like try! was a thing in the past? Once view types will be available in stable rust, then cargo fix will be able automatically re-write them and clippy/compiler warning will discourage the use of the deprecated annotation? Basically what I’m proposing is to use an annotation right now for non-public use of partial borrows, while all all code written this way is expected to have to be automatically upgraded to the unified syntax in 2-3 years when partial views are ready and stable.
Discussion in the ATmosphere