diff options
| author | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-12-13 14:31:17 -0600 |
|---|---|---|
| committer | QuietMisdreavus <grey@quietmisdreavus.net> | 2018-12-13 14:31:17 -0600 |
| commit | 22de23e303c0b07e3cb4e23fe2abf5ff2c186a3a (patch) | |
| tree | 89b06dd8ba92ebc167dbe3ceec30f6d8efb21de3 /src | |
| parent | dd8fc7dc06dea00afbd365468cf4804f68a3531c (diff) | |
| download | rust-22de23e303c0b07e3cb4e23fe2abf5ff2c186a3a.tar.gz rust-22de23e303c0b07e3cb4e23fe2abf5ff2c186a3a.zip | |
add `crates` to the final doctest
Diffstat (limited to 'src')
| -rw-r--r-- | src/librustdoc/test.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/librustdoc/test.rs b/src/librustdoc/test.rs index be9327ced26..ff6f5263fc3 100644 --- a/src/librustdoc/test.rs +++ b/src/librustdoc/test.rs @@ -395,6 +395,7 @@ pub fn make_test(s: &str, // Now push any outer attributes from the example, assuming they // are intended to be crate attributes. prog.push_str(&crate_attrs); + prog.push_str(&crates); // Uses libsyntax to parse the doctest and find if there's a main fn and the extern // crate already is included. @@ -488,6 +489,8 @@ pub fn make_test(s: &str, prog.push_str("\n}"); } + debug!("final doctest:\n{}", prog); + (prog, line_offset) } |
