External Publication
Visit Post

Idea: Borrowck Transparent Function Calls

Rust Internals [Unofficial] March 20, 2026
Source

Bike shedding

What about making it fn foo(*self)? To basically say that the function doesn't borrow self at all. Because if we have &self, there is a lifetime, butby proposal it should be totally ignored, so it has no sense to have it there.

With this, it will no longer be a "full function", and we can stop caring about "function is the reasoning boundary"? (Because it's not a "full function", but basically an extremely restrained macro, with good lsp support).

Discussion in the ATmosphere

Loading comments...