Rust uses the null pointer optimization (or "niche optimization") for pointer types that can never represent the value 0 (null).