Closed
Description
@mgattozzi's excellent talk at RustConf just now made a really good point: functions that panic should document that panic in their documentation.
While we can't detect this in the completely general case, we could detect explicit calls to panic!()
, and RFC 2091 would give the compiler enough information that it could detect calls to functions that (may) panic.
I'd love to see an optional lint for functions that call panic, indirectly or directly, without documentation of that. (Having such documentation would require fairly fuzzy detection, unfortunately, but I still think this is worth considering..)