add xtask doctest#2255
Open
tlyu wants to merge 3 commits intorust-lang:masterfrom
Open
Conversation
Add a new `xtask`` command `doctest` that runs `mdbook test`. This ensures that `rustdoc`, when run from `mdbook`, will use the toolchain override. fixes rust-lang#2251
ehuss
reviewed
May 4, 2026
Contributor
There was a problem hiding this comment.
If we add this, then I think we should also update the documentation to guide users towards the preferred command/workflow. So for example:
reference/dev-guide/src/examples.md
Line 32 in e6b3010
reference/dev-guide/src/tests.md
Line 6 in e6b3010
reference/dev-guide/src/tests.md
Lines 22 to 28 in e6b3010
Contributor
Author
|
Thanks for the review! Oops, I had some edits in progress before I saw your comments. Will incorporate them soon. |
Rename the xtask command to `mdbook-test`. Adjust documentation accordingly. Adjust `OPTIONS`` in xtask.
Contributor
Author
|
I think the latest revision addresses your comments. Please let me know what you think! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add a new
xtask`` commanddoctestthat runsmdbook test. This ensures thatrustdoc, when run frommdbook`, will use the toolchain override.fixes #2251