Rust is a systems programming language that targets three goals at once: safety, speed, and concurrency. What distinguishes it from most peers is that it achieves memory safety without a garbage collector, instead relying on a compile-time ownership system that the borrow checker enforces on every program.
The ownership model rests on three rules. Every value in Rust has exactly one owner, there can only be one owner at a time, and when that owner goes out of scope the value is dropped. Because these rules are checked statically, entire classes of bugs — use-after-free, double-free, and many memory leaks — become impossible rather than merely unlikely.
When code needs to access a value without taking ownership of it, it borrows the value through a reference. An immutable reference, written as `&T`, is a shared borrow: many immutable references may coexist freely. A mutable reference, written as `&mut T`, is an exclusive borrow: at most one such reference may exist, and no immutable references may exist alongside it. The compiler verifies these aliasing rules on every function, which means the same checks that prevent data races in single-threaded code also prevent them across threads.
Lifetimes are the annotations that describe how long references remain valid. A lifetime parameter such as `'a` ties a reference's validity to a particular scope, and the compiler uses these annotations to prevent dangling references. The `'static` lifetime is a special case that means the reference is valid for the entire duration of the program, which is precisely why string literals have the type `&'static str`. Together, ownership, borrowing, and lifetimes form the foundation that makes Rust's memory safety guarantees possible.