Partial Borrows in Rust
Comments
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Ranked by a public rubric, not by votes: what a comment adds counts, not who wrote it. How comments are ranked · Comment rules
Summary
Researchers at the National University of Singapore and the Australian National University propose view types for Rust, which let a method's signature list the struct fields a reference may access, so a call no longer borrows the whole struct. The design stays modular, is implemented in rustc, and adds no runtime cost. They mechanize the Aeneas borrow-checking semantics in Rocq, repair gaps in it, and prove the extension sound. The paper's evaluation figures could not be verified, but the Helix editor case shows the workarounds this could replace.