Ownership is Rust’s way of making memory safety checkable instead of hopeful. If you have bounced off it before, the problem is usually not the rules — it is the vocabulary. This post uses plain words.

The three rules #

  1. Every value has exactly one owner.
  2. When the owner goes out of scope, the value is dropped.
  3. You can lend the value out — either to one reader-writer, or to any number of readers.

That is it. Everything else is consequence.

Moves are transfers, not copies #

rust
fn main() {
    let s = String::from("hello");
    let t = s;              // ownership moves to t
    println!("{t}");         // fine
    // println!("{s}");      // error: `s` was moved
}

A move is not a copy — the stack bits of s are not duplicated. The compiler just marks s as no longer usable and the heap buffer lives on under t. Copies happen only for types that are cheap and stack-local by definition.

Borrowing is lending #

If moves were the only tool, every function call would eat its arguments. Borrows fix that:

rust
fn length(s: &String) -> usize {
    s.len()
}

fn main() {
    let s = String::from("hello");
    let n = length(&s);     // lend, don't give away
    println!("{s} has {n} characters");
}

The rules of lending mirror the aliasing rules of the language:

  • One &mut borrow, or
  • Any number of & borrows,

…at any moment. This is what eliminates data races at compile time — no locks, no runtime borrow checker, no garbage collector.

Lifetimes are just scopes #

A lifetime annotation like 'a never changes how long anything lives. It documents a relationship: “this return value borrows from this argument.”

rust
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
    if a.len() > b.len() { a } else { b }
}

The compiler cannot guess this on its own, because both branches are possible. The annotation is a proof obligation, discharged by the caller.

Where people actually get stuck #

SymptomReal cause
“Fighting the borrow checker”State is shared and mutated too broadly
Cloning to make errors stopOwnership boundaries are in the wrong place
Lifetime soupFunctions doing too much at once

In each case the fix is design: shrink the mutable surface, pass data down instead of reaching up, split the function.

Closing thought #

Ownership is not ceremony you pay for performance. It is the reason a Rust binary of this shape can run for years without a use-after-free, and the reason refactoring is not scary. The rules are small; the consequences are deep — which is exactly what you want from a systems language.