Rustdoc should emit a warning if a main
function is surrounded by non-items in a doctest
#140310
Labels
A-doctests
Area: Documentation tests, run by rustdoc
A-lints
Area: Lints (warnings about flaws in source code) such as unused_mut.
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
For example:
In this case, the
main
function will be wrapped into anothermain
function and won't be run. We should warn about it.The text was updated successfully, but these errors were encountered: