Skip to content
This repository was archived by the owner on May 28, 2025. It is now read-only.

Commit 4358284

Browse files
Add documentation on DocTest and RunnableDoctest structs
1 parent 8033aac commit 4358284

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/librustdoc/doctest.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,7 @@ fn wrapped_rustc_command(rustc_wrappers: &[PathBuf], rustc_binary: &Path) -> Com
433433
command
434434
}
435435

436+
/// This struct contains information needed for running a doctest.
436437
struct RunnableDoctest {
437438
full_test_code: String,
438439
full_test_line_offset: usize,

src/librustdoc/doctest/make.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ use rustc_span::FileName;
1717

1818
use super::GlobalTestOptions;
1919

20+
/// This struct contains information about the doctest itself which is then used to generate
21+
/// doctest source code appropriately.
2022
pub(crate) struct DocTest {
2123
pub(crate) supports_color: bool,
2224
pub(crate) already_has_extern_crate: bool,

0 commit comments

Comments
 (0)