{
  "$type": "site.standard.document",
  "bskyPostRef": {
    "cid": "bafyreialbl7i3kbliwx6xrcupfu6ixpn6ilz6caexw5i5vk7caaf466pli",
    "uri": "at://did:plc:ivbknywyskln22er3nkssdhl/app.bsky.feed.post/3mhjduf2ekw72"
  },
  "path": "/t/idea-borrowck-transparent-function-calls/24103#post_9",
  "publishedAt": "2026-03-20T11:59:32.000Z",
  "site": "https://internals.rust-lang.org",
  "textContent": "zirconium-n:\n\n> What's your stance if functions that can be called transparently must be annotated with `#[helper]`? It's not supposed to mark every private function with `#[helper]`. You could think this as softer and checked escape hatch than unsafe blocks, or a much more ide-friendly version of macro.\n\nThat would certainly help for human reasoning, by raising a flag that something funny is going on.\n\nzirconium-n:\n\n> It's a common encounter that trying out a small change needs large refactor, which often leads to refactoring again.\n\nI have found Rust one of the easiest languages to refactor in, as the compiler will tell me what is left to do, rather than me having to hope I got everything (Python) or decode inscrutable error messages (C++ with templates).\n\nNor I have found it hard to do small experiments, rather when that happens it seems to indicate that my code isn't modular enough or written too much in an OOP style, and thus needs a refactor anyway to a more modular and functional style. Thus I'm not at all convinced this is a real problem.\n\nWhat I _do_ agree would be useful is partial borrowing. But I suspect you would find an explicit version of it works just fine, especially if it is just depth 0 or 1 as you describe. Then you basically only need to update in one or two places for your experiments. I think we should aim to get explicit partial borrowing first and see how that works out.\n\nzirconium-n:\n\n> On compile times: I believe borrowck basically takes no time (<1%) compared to other part of the compilation process. So I won't worry too much about it.\n\nWould it stay that way?",
  "title": "Idea: Borrowck Transparent Function Calls"
}