Skip to content

Commit 932094c

Browse files
Improve documentation for internal doctest API
1 parent 20b9f35 commit 932094c

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/librustdoc/doctest.rs

+13
Original file line numberDiff line numberDiff line change
@@ -456,6 +456,10 @@ impl RunnableDocTest {
456456
}
457457
}
458458

459+
/// Execute a `RunnableDoctest`.
460+
///
461+
/// This is the function that calculates the compiler command line, invokes the compiler, then
462+
/// invokes the test or tests in a separate executable (if applicable).
459463
fn run_test(
460464
doctest: RunnableDocTest,
461465
rustdoc_options: &RustdocOptions,
@@ -705,6 +709,15 @@ impl IndividualTestOptions {
705709
}
706710

707711
/// A doctest scraped from the code, ready to be turned into a runnable test.
712+
///
713+
/// The pipeline goes: [`clean`] AST -> `ScrapedDoctest` -> [`RunnableDoctest`].
714+
/// [`run_merged_tests`] converts a bunch of scraped doctests to a single runnable doctest,
715+
/// while [`generate_unique_doctest`] does the standalones.
716+
///
717+
/// [`clean`]: crate::clean
718+
/// [`RunnableDoctest`]: crate::doctest::RunnableDoctest
719+
/// [`run_merged_tests`]: crate::doctest::runner::DocTestRunner::run_merged_tests
720+
/// [`generate_unique_doctest`]: crate::doctest::make::DocTestBuilder::generate_unique_doctest
708721
pub(crate) struct ScrapedDocTest {
709722
filename: FileName,
710723
line: usize,

0 commit comments

Comments
 (0)