-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
Doctests don't work in bin targets, non-public items #50784
Copy link
Copy link
Open
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Metadata
Metadata
Assignees
Labels
A-doctestsArea: Documentation tests, run by rustdocArea: Documentation tests, run by rustdocC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.Relevant to the rustdoc team, which will review and decide on the PR/issue.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status
It's surprising that doctests sometimes don't run at all, and there's no warning about this.
cargo test --allI'd expect the above to fail, but it looks like the doc-comment code is never ran. Even if I explicitly enable doctests for the binary:
they still aren't run.
(moved from rust-lang/cargo#5477)