Hacker News new | ask | show | jobs
by sans-seraph 688 days ago
> Ability to temporarily borrow exclusively owned objects as either shared or exclusive-mutable adds enough flexibility.

Rust quietly has several other features in order to improve the quality-of-life of its ownership model. Two examples: if you have a mutable reference then Rust will coerce it to an immutable reference if one is required, and if you have a mutable reference then Rust will transparently re-borrow it when calling functions that accept mutable references in order to allow you to use the mutable reference more than once despite the fact that they do not implement Copy.