Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upLint to track "Panics" section of rustdoc? #22969
Open
Labels
Comments
|
The no-panic crate works after monomorphization, so can deal with generic functions (at the cost of working at link time rather than compile time). |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
At the moment, we have an ad-hoc script which greps for function names that look like they'll cause panic. https://github.com/servo/servo/blob/master/etc/ci/check_no_panic.sh
A somewhat more principled approach would be a lint that checks functions for the
Panicsrustdoc section, and warns if it finds a function that a) calls a function with aPanicssection of its docs, and b) doesn't have its ownPanicssection. With an appropriateallowfor cases where we're really really sure the panic can't happen.