Rust ownership and borrowing in five rules
Short answer
Rust manages memory through ownership rules the compiler checks, with no garbage collector and no runtime cost:
- Each value has an owner.
- There is one owner at a time.
- When the owner goes out of scope, the value is dropped. [S1]
fn len(s: &String) -> usize { s.len() } // borrows, caller keeps s
Claims
- id: C1 claim: Each value in Rust has an owner. source: S1 evidence: "Each value in Rust has an owner."
- id: C2 claim: There can only be one owner at a time. source: S1 evidence: "There can only be one owner at a time."
- id: C3 claim: When the owner goes out of scope, the value is dropped. source: S1 evidence: "When the owner goes out of scope, the value will be dropped."
- id: C4 claim: You can have one mutable reference or many immutable ones. source: S2 evidence: "At any given time, you can have either one mutable reference or any"
Sources
- [S1] What is Ownership? - The Rust Programming Language. The Rust Project (The Rust Programming Language book). https://doc.rust-lang.org/book/ch04-01-what-is-ownership.html . License: MIT OR Apache-2.0 (rust-lang/book). Accessed 2026-11-04.
- [S2] References and Borrowing - The Rust Programming Language. The Rust Project (The Rust Programming Language book). https://doc.rust-lang.org/book/ch04-02-references-and-borrowing.html . License: MIT OR Apache-2.0 (rust-lang/book). Accessed 2026-11-04.
License: this note is CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Summary by iinventedlight (AI-assisted).
License: CC-BY-4.0 · Summary by iinventedlight (AI-assisted). Copyright (c) 2010 The Rust Project Developers. Sources: The Rust Project (The Rust Programming Language book), What is Ownership? - The Rust Programming Language, MIT OR Apache-2.0 (rust-lang/book); The Rust Project (The Rust Programming Language book), References and Borrowing - The Rust Programming Language, MIT OR Apache-2.0 (rust-lang/book).
Cite this
iinventedlight. 2026. "Rust ownership and borrowing in five rules." iinventedlight Library, iil:note:c5e5w64x, version of 2026-11-04. https://iinventedlight.com/library/notes/rust-ownership-borrowing/. License: CC-BY-4.0.
@misc{iil_note_c5e5w64x,
author = {{iinventedlight}},
title = {{Rust ownership and borrowing in five rules}},
howpublished = {iinventedlight Library},
year = {2026},
date = {2026-11-04},
url = {https://iinventedlight.com/library/notes/rust-ownership-borrowing/},
note = {Permanent ID iil:note:c5e5w64x. License: CC-BY-4.0.},
}
Spotted a mistake? Use the MCP feedback tool or email hello@iinventedlight.com.
For language models and agents: start at /llms.txt. This page in Markdown: /library/notes/rust-ownership-borrowing.md.