Is there an exhaustive list somewhere of all the places in Rust language and std which can cause a panic?
Off the top of my head: numeric overflow/underflow, out of bounds indexing, explicit panic macro and similar macros, assertion macros, unwrap/expect and similar methods
@nrc pretty much anything that mutates Vec can panic due to allocation failure. Probably other collections are similar.
@ephemeron @nrc those cases are probably of interest wherever panics are of interest but they’re not actual panics if std is linked:
https://doc.rust-lang.org/alloc/alloc/fn.handle_alloc_error.html handle_alloc_error in alloc::alloc - Rust
Signals a memory allocation error.
std - Rust
The Rust Standard Library