Rust successfully applies ownership types to control memory allocation. This restricts the programs' topologies to the point where doubly-linked lists cannot be programmed in Safe Rust. We sketch how more flexible "local" ownership could be added to Rust, permitting multiple mutable references to objects, provided each reference is bounded by the object's lifetime. To maintain thread-safety, locally owned objects must remain thread-local; to maintain memory safety, local objects can be deallocated when their owner's lifetime expires.
翻译:Rust 成功应用所有制类型来控制内存分配。 这限制了程序在安全内脏中无法编程的双重关联列表的表层。 我们勾画了如何将更灵活的“ 本地” 所有权添加到 Rust 中, 允许多变引用物体, 只要每个引用都受天体寿命的约束。 为了保持线条安全, 本地拥有的物体必须保持线条本地; 为了维护内存安全, 本地天体可以在天体拥有者寿命到期时进行交易 。