Skip to content

Optional lint for functions that panic without mentioning panics in rustdoc #1974

Closed
@joshtriplett

Description

@joshtriplett

@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..)

Metadata

Metadata

Labels

A-lintArea: New lintsgood first issueThese issues are a good way to get started with Clippy

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions