RunnableDocTest in rustdoc::doctest - Rust (original) (raw)
Struct RunnableDocTest
pub(crate) struct RunnableDocTest {
full_test_code: String,
full_test_line_offset: usize,
test_opts: IndividualTestOptions,
global_opts: GlobalTestOptions,
langstr: LangString,
line: usize,
edition: Edition,
no_run: bool,
merged_test_code: Option<String>,
}
Expand description
Information needed for running a bundle of doctests.
This data structure contains the “full” test code, including the wrappers (if multiple doctests are merged), main
function, and everything needed to calculate the compiler’s command-line arguments. The #
prefix on boring lines has also been stripped.
Note: Most layout information is completely unstable and may even differ between compilations. The only exception is types with certain repr(...)
attributes. Please see the Rust Reference's “Type Layout” chapter for details on type layout guarantees.
Size: 336 bytes