#borrowing

4 articles about borrowing

rustMarch 31, 2026

What is &mut *x (reborrow) in Rust, and why does it freeze the original reference?

A reborrow duplicates the reference, not the data, and freezes the original for its duration. What &mut *x really does.

rustAugust 10, 2025

Mutable vs. immutable borrows: the two rules

The two borrowing rules, why exclusivity is the one that matters, and what the borrow checker actually rejects.

rustAugust 2, 2025

How does ownership prevent memory leaks and data races?

How the ownership rules close off memory leaks and data races before the program ever runs, and where they stop short.

rustJuly 31, 2025

How does Rust ensure memory safety without a garbage collector?

Ownership, borrowing and lifetimes give Rust memory safety at compile time, with no collector and no runtime pauses to budget for.