Drop running on scope exit is kinda just a sacrosanct truth in rust that exists as a concession to making programs easier to reason about. It's most important for unsafe
code where you may have untracked raw pointers into a buffer and Really Don't Want That Buffer To Go Away Early. I'm honestly a bit surprised you're still looking at this, given you were previously finding issues with this approach with nice and safe ARC code.
The Rust team looked into what you're proposing a bit a couple years ago, calling it "eager drop", although I wasn't around for it, so I'm just linking things:
- Eager drop - The Rust Language Design Team
- MCP: Allowing the compiler to eagerly drop values · Issue #86 · rust-lang/lang-team · GitHub
- zulip thread where discussion happened
The conclusion was "no", of course.
(Currently typing up a followup comment that just braindumps a bunch of extra random facts about drops+borrows in Rust.)