A missing item has two safe outcomes

A list holds four items. The program asks for a fifth.

Conceptual list — not a memory layout
Checked lookup
get

Returns “none.”
The program can handle the missing item.

Ordinary indexing

Panics.
Execution is interrupted rather than reading beyond the list.

These protections apply while software runs. Ownership and lifetime rules also reject invalid uses of references before execution. Unsafe operations and connections to C/C++ still require developers to uphold memory-safety rules.