mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-08 09:38:26 +03:00
0ab75c37b6
Add lint panic in result ### Change Adding a new "restriction" lint that will emit a warning when using "panic", "unimplemented" or "unreachable" in a function of type option/result. ### Motivation Some codebases must avoid crashes at all costs, and hence functions of type option/result must return an error instead of crashing. ### Test plan Running: TESTNAME=panic_in_result cargo uitest --- changelog: none